我正在尝试获取这一列单词:
Suzuki music
Chinese music
Conservatory
Blue grass
Rock n roll
Rhythm
Composition
Contra
Instruments
变成这种格式:
"suzuki music", "chinese music", "conservatory music", "blue grass", "rock n roll", "rhythm"...
这是我尝试过的:
stuff = [
Suzuki music
Chinese music
Conservatory
Blue grass
Rock n roll
Rhythm
Composition
Contra
Instruments
]
for line in stuff:
list.append("'" + line + "',")
但我得到这个错误:
文件“/private/var/folders/jv/9_sy0bn10mbdft1bk9t14qz40000gn/T/Cleanup At Startup/artsplus_format_script-393966065.996.py”,第 2 行内容 = [ ^ IndentationError:意外缩进注销