0

How to arrange something in alphabetical order

For e.g names such as abhi, sneha, rishi, etc how to arrange them in alphabetical order in python

27th Apr 2021, 2:22 PM
Harshita Sharma
Harshita Sharma - avatar
5 Respuestas
+ 3
Just sort them, easy! ;)
27th Apr 2021, 2:24 PM
minirkk
minirkk - avatar
27th Apr 2021, 2:25 PM
Slick
Slick - avatar
+ 2
Hi You use use sorted function. s = "acxd" print (sorted(s)) #output = ['a','c','d','x'] but it's better to use loops
27th Apr 2021, 2:28 PM
Mani_K_A
0
Thanks😊
27th Apr 2021, 2:28 PM
Harshita Sharma
Harshita Sharma - avatar
0
Thanks😊😊
27th Apr 2021, 2:50 PM
Harshita Sharma
Harshita Sharma - avatar