How to get multiple inputs in one line in Python?
Here's what I want:
Python Input:
Enter name and age respectively: Subha 18
Output:
Your Name Is Subha and Your age is 18 years
Here is what I tried:
inp = input()
x = inp.split()
print x[0] # Won't work
print x[1]
The error is (console):
SyntaxError: unexpected EOF while parsing
Traceback (most recent call last):
File "source_file.py", line 3, in <module>
inp = input()
File "<string>", line 1
11 22
^