'Converting input of str numbers to list of int numbers doesn't work on Pycharm but does on IDLE?
Hello I'm trying to convert an input of string numbers e.g. >>>1 2 3 4 into a list of integers >>>[1, 2, 3, 4] with this line of code.
list_of_numbers = [int(i) for i in input().split()]
print(list_of_numbers)
it works in IDLE but not Pycharm. I cannot find an alternative on stack-overflow. I've tried many variations. Any help would be appreciated.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
