摘要:
字符串常用操作 移除空白 分割 長(zhǎng)度 索引 切片 class str(basestring): """ str(object='') -> string Return a nice string representation of the object. If the argument is a s 閱讀全文
摘要:
#求100內(nèi)奇數(shù)和while\for..in循環(huán) sum = 0 i = 1 while i <= 100: sum += i i += 2 print(sum) sum = 0 for i in range(1,101,2): sum += i print(sum) #求100內(nèi)偶數(shù)while\for..in循環(huán) sum = 0 i = 0 while i <=... 閱讀全文