返回顶部

收藏

Change string to a list and Reference its index

更多
S = 'spammy'
L = list(S)
print L

L[3] = 'x'              # works for lists, not strings
L[4] = 'x'
print L

标签:Python,Buildin,Function

收藏

0人收藏

支持

0

反对

0

发表评论