pog*_*ogo 0 list python-2.7
嗨,我有一个动态字符串,我想创建一个包含字符串的列表.
Ex. a = "hello" b = xxx(a) should give ['hello'] when I try b = list(a), I get b = ['h','e','l','l','o']
我该如何实现这一目标?谢谢.
Mar*_*ers 5
改为使用单个元素创建列表:
b = [a]
归档时间:
13 年,7 月 前
查看次数:
34 次
最近记录: