0

From my looking around, it seems that the < and > operators have something to do with comparing strings.

For example, if I do 'Charlie' < 'Daniel' I get True. Does the true indicate that charlie would come first before daniel if they were both added to a list alphabetically?

And if I did 'Danielle' < 'Daniel' and get False, that means alphabetically danielle would come after daniel in a list? So if the first string is less than the second, it comes first alphabetically?

Thank you for the clarification.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441

0 Answers0