Code:
class Solution:
def reverseWords(self, s: str) -> str:
e=s.split(" ");
output=[];
for i in e:
a=list(i);
a.reverse();
es="".join(a);
output.append(es);
return " ".join(output);
Python for beginners: https://www.youtube.com/watch?v=egq7Z... Web ๐http://www.clcoding.com/ Telegram: https://t.me/clcoding_python https://www.facebook.com/pirawenpython/ https://www.facebook.com/groups/piraw...
class Solution:
def reverseWords(self, s: str) -> str:
e=s.split(" ");
output=[];
for i in e:
a=list(i);
a.reverse();
es="".join(a);
output.append(es);
return " ".join(output);
Python for beginners: https://www.youtube.com/watch?v=egq7Z... Web ๐http://www.clcoding.com/ Telegram: https://t.me/clcoding_python https://www.facebook.com/pirawenpython/ https://www.facebook.com/groups/piraw...
0 Comments:
Post a Comment