【发布时间】:2021-02-10 13:17:03
【问题描述】:
这是给我的字符串Enter 3 random strings, separated by commas: The,Dave,Make
我希望列表仅包含以下内容:["The", "Dave", "Make"]
我尝试过使用拆分,但结果是错误
strings = input("Enter 3 random strings, separated by commas:")
strings = strings.split()
【问题讨论】:
-
请展示您尝试过的内容,并说明您遇到的问题。谢谢。
标签: python python-3.x string list