Sum Qo'D tob 'e' SoH
jeD ngeH maHaD 'e roj message maHa might consider
leaving SoH yong roj 'baD yInD SoHDa Haup lives
jeD ngeH maHaD 'e roj message maHa might consider
我如何可以將其轉換到這個列表:Python3創建列表
[['Sum', 'Qo'D', 'tob', "'e'", 'SoH'],
['jeD', 'ngeH', 'maHaD', "'e", 'roj', 'maHa', 'might'],
['leaving', 'SoH', 'yong', 'roj', "'baD", 'yInD', 'SoHDa', 'Haup']
['jeD', 'ngeH', 'maHaD', "'e", 'roj', 'message', 'maHa', 'might', 'consider']]
例如list[0]
是['Sum', 'Qo'D', 'tob', "'e'", 'SoH']
或list[0][0]
是Sum
。
見:['str.split()'](HTTPS://docs.python .ORG/3 /庫/ stdtypes.html#str.split)。 –