Skip to main content
Ask a Question
Asked a question last year

# i want to find the second last elment in a list but i got a error ......... n=int(input()) arr=[] i=1 while i<=n: arr.append(int(input())) i=i+1 s=len(arr) sorted(arr) print(arr[-2]) ...... #error :Traceback (most recent call last): File "", line 5, in <module> arr.append(int(input())) ValueError: invalid literal for int() with base 10: '2 3 6 6 5'

Fuel your ambition, discover your passion and achieve your professional goals with LetsUpgrade.
Sign Up Now