I am trying to get python 2.7 to store a single line of input that contains both a string and three float numbers so that I can perform some averages, etc.
ex. input: Tom 25 30 20
I tried:
name, score1, score2, score3 = raw_input().split()
score1, score2, score3 = [float(score1),float(score2),float(score3)]
but it throws an "invalid literal" error due to the string. Additionally, my code feels bulky, would there be a simpler way to go about this?
Thank you for any help!