We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
What does [-2] mean? I'm new here so I don't understand the use of print(arr[-2]). What does arr=sorted(list(set(arr))) actually do?
I would really appreciate your help.
Find the Runner-Up Score!
You are viewing a single comment's thread. Return to all comments →
What does [-2] mean? I'm new here so I don't understand the use of print(arr[-2]). What does arr=sorted(list(set(arr))) actually do? I would really appreciate your help.
arr=sorted(list(set(arr))) print(arr[-2])