Let's say I have three words I want to sort:
- hello
- goodbye
- alex
And alphabetically it'd be sorted ascendingly as ["alex", "goodbye", "hello"]. Is there a way to convert the string (limited to 100 characters)? For example, if I have:
['a', 'l', 'e', 'x']
And I use ord to get the code for each list element:
[1, 12, 5, 24]
How would I create a number from that, that would also be smaller than, say, goodbye?