Change string to a list and Reference its index,changereference,S = 'spammy'
Change string to a list and Reference its index,changereference,S = 'spammy'
S = 'spammy'L = list(S)print LL[3] = 'x' # works for lists, not stringsL[4] = 'x'print L
- The use of a variable,usevariable,name = 'Larr
- Class inside a List,classinsidelist,class B:
- Import all members in a module,importmodule,#//File: m
- List comprehensions: ord,comprehensionsord,res = [ord(
- Define function to Open a file,definefunction,import s
- Writing to Files,writingtofiles,# Append mod
热门文章:
相关内容
- The use of a variable,usevariable,name = 'Larr
- Class inside a List,classinsidelist,class B:
- Import all members in a module,importmodule,#//File: mod
- List comprehensions: ord,comprehensionsord,res = [ord(x
- Define function to Open a file,definefunction,import sysde
- Writing to Files,writingtofiles,# Append mod
- Special char output,specialcharoutput,print \'''St
- bitwise AND,bitwiseand,x = 1
- Give the parameters in the function default values,parametersvalues
- Tuple sequence,tuplesequence,X = 'spam'Y
评论关闭