Beginner python “None” issue

后端 未结 3 1885
说谎
说谎 2021-01-15 04:27

I just started on python and since I started a new calculator project, pyCharm spits out none after everything. I\'m not sure what\'s causing this error, I would appreciate

3条回答
  •  梦毁少年i
    2021-01-15 05:16

    Remove print statements from input calls:

    input(print("What's your first number?")) -> input("What's your first number?\n") or input("Your first number: ")

    That None is the return value of print function that is displayed by input function.

提交回复
热议问题