Im new to coding in python, and is trying to make this work.
if input from user is "name age" it works just fine. But I want it to work if user inputs either (name+age) or (name+lastname+age). If I input 3 values I get ValueError: too many values to unpack (expected 2)
and if add name, lastname, age, =map(str, sys.stdin.readline().split()) to the code. I get a not enough values error when user input name+lastname+age
Hopefully someone can help me :)
name, age, =map(str, sys.stdin.readline().split())
age = int(age)
if "Paul" in (name):
result1 = (age*2)
print("Answer is", + result1)