Usually, when I have to input a list of space-separated integers in this fashion:
12 15 31 -12
I use this function:
list(map(int, input().split()))
So that it returns [12, 15, 31, -12].
But, now, if for some reason I have to input the numbers as positive integers only (ie. their absoulte value), how should I go with it the easiest way?
I could very well input all the numbers in the list and then one by one, convert them to their absolute value, but is their a better method?