Question: I am trying to write code that can be run through the command line to accept a user list separated by spaces, then find the
I am trying to write code that can be run through the command line to accept a user list separated by spaces, then find the number that repeats most often and says what number it is and how many times it repeats. I keep getting this error reading in the user input, any help would be appreciated.



Please input a list of numbers separated by spaces: 1 2 2 1 5 1 1 7 7 7 7 1 1 Traceback (most recent call last): File "/Users/ Downloads/longrun.py", line 26, in main( File "/Users/ Downloads/longrun.py", line 19, in main raw_input = input("Please input a list of numbers separated by spaces: ").st rip().split() File "", line 1 1 2 2 1 5 1 1 7 7 7 7 1 1 SyntaxError: invalid syntax import sys import stdio import stdarray def longest_run(user_nums): max_count, count = 0, 1 for i in range(1, len(user_nums)): if numbers[i] != numbers[i-1]: if count > max_count: max_count = count count = 1 else: count += 1 if len(numbers) > and count > max_count: max_count = count return max_count def main(): raw_input = input("Please input a list of numbers separated by spaces: ").strip().split() user_nums = [] for string in raw_input: if string.strip() != '': user_nums.append(int(string) stdio.writeln('Longest run: , longest_run(numbers), 'consecutive , numbers [number] , ''s.') main() 1.5.5 in the textbook Compose a program that reads in a sequence of integers and writes both the integer that appears in a longest consecutive run and the length of the run. For example, if the input is 1 2 2 1 5 11 777 7 1 1, then your program should write Longest run: 4 consecutive 7s. Name your file longrun.py and upload to Moodle