Relative Content

Tag Archive for arrayspython-3.xlist

python list indexing is out of range

` arr = map(int, input().split()) for i in reversed(sorted(list(arr))): if i < sorted(list(arr))[-1]: print(i) break ` hello i need to print the second highest value from a list of numbers from spaced input using a space when i print ‘sorted(list(arr))[-1]’ i get the number in the last index but when i try to iterate through […]