使用 .split() 方法时 Sublime Text 3 显示无输出
Sublime Text 3 showing no output when using .split() method
我在输入上使用 .split()
方法,而 sublime text 只是不提供输出,文件不再显示任何类型的输出,就像文件已损坏一样。我使用的代码:
x=input().split(',')
print(x)
我在 python idle 中尝试了相同的代码行,它工作得很好。
x=input().split(',')
print(x)
我希望输入的输出:hello,hi,world
为 ['hello','hi','world']
但它根本没有显示输出。
Sublime Text 中的内置代码运行器不支持用户通过其控制台输入。我建议使用您的终端来执行代码,或使用 SublimeREPL
我在输入上使用 .split()
方法,而 sublime text 只是不提供输出,文件不再显示任何类型的输出,就像文件已损坏一样。我使用的代码:
x=input().split(',')
print(x)
我在 python idle 中尝试了相同的代码行,它工作得很好。
x=input().split(',')
print(x)
我希望输入的输出:hello,hi,world
为 ['hello','hi','world']
但它根本没有显示输出。
Sublime Text 中的内置代码运行器不支持用户通过其控制台输入。我建议使用您的终端来执行代码,或使用 SublimeREPL