0

comparison of letter of alphabet

if "b" > "a":
    print("greater")

is python going to evaluate them in order they appear in alphabet? what if i evaluate a letter like a with a number? will it be according to ASCII?

Neol
  • 13
  • 1
  • 4

1 Answers1

0

Yes.

Here are a few examples:

enter image description here

And for your convenience, the ASCII table:

enter image description here

Shir
  • 1,571
  • 2
  • 9
  • 27