Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/350.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何在Jupyter中使用输入?_Python_Input_Jupyter Notebook_Jupyter - Fatal编程技术网

Python 如何在Jupyter中使用输入?

Python 如何在Jupyter中使用输入?,python,input,jupyter-notebook,jupyter,Python,Input,Jupyter Notebook,Jupyter,我试着喜欢下面的内容,但不起作用 ''' students = [] while True: new = list(input("Name, Grade, Number: ")) student.add(new) if not new: break ''' 它没有显示任何结果。我无法输入任何内容。请尝试不使用三重引号: students = [] while True: new = list(input("Name, Grade, Numbe

我试着喜欢下面的内容,但不起作用

'''
students = []

while True:
    new = list(input("Name, Grade, Number: "))
    student.add(new)
    if not new:
        break
'''

它没有显示任何结果。我无法输入任何内容。

请尝试不使用三重引号:

students = []

while True:
    new = list(input("Name, Grade, Number: "))
    students.add(new) # typo here
    if not new:
        break

你的代码真的在注释中吗?三重引号注释了那些代码。我尝试了那段代码,没有三重引号“”,但在这里写三重引号是我的错误。天哪,我没有看到那个打字错误。。。