I have an input to my code in the form of space separated integers (example, 1 20 92 11). Commonly I would read this into a list using list(map(int, input().split())).
However, I do not want to allocate a list, and simply want to read in numbers one at a time. Pseudo code looks something like this:
def solve():
num = read_num()
do_something_with_num()
How do I do this?