0
Explain the output
Could anyone explain the output for this print statement.... I donât understand why it return ârâ print(max("SoloLearn"))
2 Answers
+ 3
When comparing strings the maximum of them is the one that has the highest ASCII value.
ASCII("S") = 83
ASCII("o") = 111
ASCII("l") = 108
ASCII("L") = 76
ASCII("e") = 101
ASCII("a") = 97
ASCII("r") = 114
ASCII("n") = 110.
Thus, "r" is returned.
0
wow!!!! I had to google ASII