I have a list which contains a word and three different numbers. I want to find a way to select the largest of these three numbers, but whenever I use the max function it selects the word instead. Is there any solution to this?
Part of my code goes as follows:
myList = list()
userName1 = input('What is your name?')
myList.append(userName1)
score1 = input('User 1 score 1')
myList.append(score1)
score2 = input('User 1 score 2')
myList.append(score2)
score3 = input('User 1 score 3')
myList.append(score3)
print(max(myList))
For these, I inputted my name (Daisy) and three numbers (6, 9 and 4). I hoped that the max function would select the 9, but instead it printed Daisy.
Daisy