Join list to a string,joinstring,S = 'spammy'
Join list to a string,joinstring,S = 'spammy'
S = 'spammy'L = list(S)print LL[3] = 'x' # works for lists, not stringsL[4] = 'x'print LS = ''.join(L)print S
相关内容
- A sentence is split up into a list of words,sentencesplit,sentence
- Demonstrates the range() function,demonstratesrange,print 'Count
- str() and repr(): Strings and floating point numbers, have two distin
- Big number,bignumber,print 999999
- Bitwise or,bitwiseor,x = 1
- Anything with a non-zero length is true, empty sequences are false,
- Complex Numbers: Multiply,numbersmultiply,print (2+1j)
- Complex numbers: represented as two floating point numbers,,#Comple
- Int: modulus (remainder), power,modulusremainder,a = 3
- Lists can be written as a list of comma-separated values (items) betw
评论关闭