Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #16419 > unrolled thread
| Started by | Alec Taylor <alec.taylor6@gmail.com> |
|---|---|
| First post | 2011-11-30 17:24 +1100 |
| Last post | 2011-11-30 17:24 +1100 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: How convert a list string to a real list Alec Taylor <alec.taylor6@gmail.com> - 2011-11-30 17:24 +1100
| From | Alec Taylor <alec.taylor6@gmail.com> |
|---|---|
| Date | 2011-11-30 17:24 +1100 |
| Subject | Re: How convert a list string to a real list |
| Message-ID | <mailman.3144.1322634302.27778.python-list@python.org> |
import json
s = json.dumps([1, 2, 3, 4])
# '[1, 2, 3, 4]'
l = json.loads(s)
# [1, 2, 3, 4]
2011/11/30 郭军权 <guojunquan@gmail.com>:
> Good after
> I have a string liststr = '["aaaa","bbbb","ccc"]' ,and I need convert
> it to a list like list = ["aaaa","bbbb","ccc"],what can id do?
> Thanks.
>
>
> --
> 郭军权
> 清华大学网络中心网络安全实验室
> guojunquan{at}gmail.com
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
Back to top | Article view | comp.lang.python
csiph-web