prostu ciekawy temat sposobu Got '1', '2', '3', ' 4 'zamiast 1, 2, 3, 4. W każdym razie.
>>> list1 = list(input("Enter the unfriendly numbers: "))
Enter the unfriendly numbers: 1, 2, 3, 4
>>> list1 = list(input("Enter the unfriendly numbers: "))
Enter the unfriendly numbers: [1, 2, 3, 4]
>>> list1
[1, 2, 3, 4]
>>> list1 = list(input("Enter the unfriendly numbers: "))
Enter the unfriendly numbers: '1234'
>>> list1 = list(input("Enter the unfriendly numbers: "))
Enter the unfriendly numbers: '1', '2', '3', '4'
>>> list1
['1', '2', '3', '4']
porządku, jakiś kod
>>> list1 = input("Enter the unfriendly numbers: ")
Enter the unfriendly numbers: map(int, ['1', '2', '3', '4'])
>>> list1
[1, 2, 3, 4]
Możliwy duplikat [Konwersja wszystkie sznurki w liście do int] (http://stackoverflow.com/questions/7368789/convert-all-strings-in-a-list-to-int) –