ラムダ、リスト内包表記などのシーケンス ジェネレーターを試しましたが、本当に必要なものを取得できないようです。私の最終的な目標は、 string[1:3]のような文字列から一連の単語を出力することです。
私が探しているもの:
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']