I\'ve been presented with the task of turning a string of mixed numbers (\"1 3 5 8 10\"), for example, and my goal is to put these numbers into a list as integers.
I ha
def iq_test(numbers): nums = [] for num in numbers.split(): nums.append(int(num))
I guess ... you could(and probably should) just do a list comprehension instead
nums = [int(num) for num in numbers.split()]