+ 2
can we sory str line for example "mekteb" how can we sort it??
4 ответов
+ 2
sorted ('mekteb') it will return a sorted list
+ 2
you can call the join method from an empty str to rebuild an str from the list
"".join(sorted("mekteb"))
+ 1
try sort as list
+ 1
thanks