How do I write a Python program for printing out second largest number given a list. For repeated numbers in the list, the code is supposed to return 'none'. This is the code I am writing:
i = int(input())
lis = list(map(int,raw_input().strip().split()))[:i]
z = max(lis)
while max(lis) == z:
lis.remove(max(lis))
print (max(lis))