我嘗試了像Lambda,List comprehension和其他的序列生成器,但似乎我無法得到我真正想要的東西。我的最終目標是從一個字符串打印字的序列,例如字符串[1:3]使用Number應用於字符串的序列生成
我在尋找:
a = [0,13,26,39]
b = [12,25,38,51]
str = 'If you are done with the file, move to the command area across from the file name in the RL screen and type'
read = str.split()
read[0:12]
['If', 'you', 'are', 'done', 'with', 'the', 'file,', 'move', 'to', 'the', 'command', 'area']
read[13:25]
['from', 'the', 'file', 'name', 'in', 'the', 'RL', 'screen', 'and', 'type']
嘛,有什麼問題嗎? –
如果我可能會問,在什麼情況下你會發現這樣的問題? – PyRulez