r/PythonLearning • u/RegularBother614 • 17d 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
1
u/max96t 16d ago
I agree. The best would probably be using the builtin
heapq.nlargestfunction ( which is O(n))