Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #input
- a = [[3,-1],[7,8,9],[10,11,15,12,15]]
- #main
- MAX = max(a,key=len) #find the longest list
- MIN = min(a,key=len) #find the shortest list
- b = len(MAX) #find the longest list's length
- c = len(MIN) #find the shortest list's length
- d = MAX.index(max(MAX)) #find the longest list's maximum's index
- e = MIN.index(min(MIN)) #find the shortest list's minimum's index
- print("(%d %d %d %d)" %(b,d,c,e))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement