SyntaxFix
Write A Post
Hire A Developer
Questions
If the number of elements in the array is not given, you can alternatively make use of list comprehension like:
str_arr = raw_input().split(' ') //will take in a string of numbers separated by a space arr = [int(num) for num in str_arr]