i have a function:
I need to first reverse the list and then take an entry from it.
Earlier, I was making the 3 functions but now I am defining the main function and the other 2 functions in it.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Your code is very unpythonic. Remember Python is not C.
ifis optional.a, usea[-1], not reversingathen get its first element.Use the built-in functions! Your modified
maxagentcan be written simply using themaxfunction:If you need the score too, consider returning a tuple.