This question already has an answer here:
- Convert all strings in a list to int 3 answers
How do I convert a space separated integer input into a list of integers?
Example input:
list1 = list(input("Enter the unfriendly numbers: "))
Example conversion:
['1', '2', '3', '4', '5'] to [1, 2, 3, 4, 5]
Just curious about the way you got '1', '2', '3', '4' instead of 1, 2, 3, 4. Anyway.
Alright, some code