Â
In this we are going to see a basic example of Sorting Sentence Alphabetically - Type 4 of Functions in Python Programming Language.
def sort_words(str):
list = str.split("-")
list.sort()
return "-".join(list)
x = sort_words("orange-mango-banana-grapes-apple")
print(x)
# Coded By DHIRAJ SHELKE
#ENJOY CODING
Post a Comment
FOR ANY DOUBTS AND ERRORS FEEL FREE TO ASK. YOUR DOUBTS WILL BE ADDRESSED ASAP