看板 [ Python ]
討論串[問題] split syntax
共 2 篇文章
首頁
上一頁
1
下一頁
尾頁

推噓1(1推 0噓 2→)留言3則,0人參與, 最新作者azulazure (獨在異鄉為異客)時間17年前 (2008/02/20 11:48), 編輯資訊
1
0
0
內容預覽:
I'm writing a python script about "split" function,. trying to use space to split a string.. It should work the same way as the built-in split functio
(還有907個字)

推噓1(1推 0噓 6→)留言7則,0人參與, 最新作者Lucemia (生の直感、死の予感)時間17年前 (2008/02/20 14:56), 編輯資訊
0
0
0
內容預覽:
inpu = "This is a sentence". word = "". output = []. for x in inpu:. if x not in " ":. word = word + x. else:. output.append(word). word = " ". output
(還有217個字)
首頁
上一頁
1
下一頁
尾頁