I am trying to sort list in Python in the ascending order.
Below is my code -
children=zk.get_children("/my/example", watch=my_func)
print(children)
So the above print statement will print out something like this -
[u'test2', u'test1', u'test3']
or
[u'test3', u'test2', u'test1']
or in any order..
Now I need to make sure that after sorting it should look like this in the ascending order
[u'test1', u'test2', u'test3']
Any thoughts how this can be done efficiently in Python?
NOTE: name will always be starting with test
and then followed by some number
.