0

Today, I wrote this code.

a, b = map(int, input("").split(""))
print(a)

However, When I enter the number a, b, I keep getting this error

File "<string>", line 1

2 3
  ^

SyntaxError: unexpected EOF while parsing

I don't know why I keep getting the error. Please help

Milo Lu
  • 3,176
  • 3
  • 35
  • 46

1 Answers1

0

You need to use => input.split(" ").

If you use split(""), which will take the consecutive 2 items like , "a" and " " as per this case. So, 3 is the extra input you are giving.

Hope it helps!

Dadep
  • 2,796
  • 5
  • 27
  • 40
Somesh
  • 82
  • 8