Got invalid syntax when entering the inputs in terminal

Viewed 33

I wrote and ran the line

a,b,c =input("enter three values").split()

and as I typed in values 1 2 3 in the terminal, I got:

   File "ddd.py", line 76, in <module>
      a,b,c =input().split()
        File "<string>", line 1
            1 2 3
              ^
   SyntaxError: invalid syntax

What happened here?

1 Answers

I feel the inputs should be a string not integers separated with whitespace. For example '1 2 3'

Related