Hi everyone, In this video am going to explain How to print words in ascending order and descending order,
Lets have few words in list
lets use in built function to sort words
sort() method by default , will act as ascending order
lets print the words,
lets run the code,
we got output in ascending order of given words,
if you want to print words in descending order , then use reverse() method
lets use print statement to print words in descending orders,
lets run the code,
now we got descending order of words in output,
Thank you for watching this video
l=['java','python','sql']
l.sort()
print (l)
l.reverse()
print (l)
On this page of the site you can watch the video online Python Tutorial - How to print words in Ascending or Descending order in PYTHON with a duration of hours minute second in good quality, which was uploaded by the user Appanna Damu 02 October 2017, share the link with friends and acquaintances, this video has already been watched 1,165 times on youtube and it was liked by 8 viewers. Enjoy your viewing!