+ 1
Can any one explain for me how lexicographically (alphabetical order)
alphabetical order ? how that look a like
2 Antworten
+ 2
In python, do something like this (sort(*, key=None, reverse=None))
Example for alphabetical list could be like this
sorted(sorted(s), key=str.upper)
It's also possible with lambda as such
text='aAaBbcCdE'
sorted(text,key=lambda x:(str.lower(x),x))
But this is deprecated, slow and not recomended
To learn more about sorting you can look here https://docs.python.org/3.6/howto/sorting.html
I'm just assuming you are using python 3.
+ 1
try the following code to understand it in simple way
print("abc" >="efg")
print("pqr">="efg")
as ABC is the beginning of the alphabetical series we get first statement result as false and second statement result as true