r/PythonLearning • u/RegularBother614 • 19d ago
What do you guys think?
I made a program that finds the second largest digit in a list.
Using the list method "remove()" and "max" function. Python is COOL!
88
Upvotes
View all comments
Show parent comment
2
u/Strong_Essay1176 19d ago
Just do a,b=numbers[0],numbers]0] In loop set max to a and prev max to b.
Any kind sort - is like rebuilding whole building just to open 2 doors.