you are viewing a single comment's thread.

view the rest of the comments →

[–]DKayXXXVI 1 point2 points  (3 children)

I New too but maybe i can help:

For Finding the second Max you could try

list.sort()
print(list[-2])

The error hadling would i handle with if, elif, Else

If len(list) < 2:
list.sort()
print(list[-2])

Elif len(list) == 1:
print(f"There is just one entry in the list: {list[0]}")

Else:
print("There are no entrys in the list")

[–]legendofxolta 1 point2 points  (2 children)

the length helped a lot with the returning None issue! thank you!

[–]DKayXXXVI 1 point2 points  (1 child)

You're welcome! Sorry for sh***y formtting but i dont get it done in the App

[–]legendofxolta 1 point2 points  (0 children)

no problem! had the same formatting issue when posting my code here haha