Friday, 24 April 2020

Reverse Words in a String III (Part 1) | LeetCode | Python | Castor Classes

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...

0 Comments:

Post a comment

Popular Posts

Categories

Android (21) AngularJS (1) Assembly Language (2) Books (10) C (75) C# (4) C++ (81) Course (1) Data Strucures (4) Downloads (1) Engineering (13) flutter (1) FPL (17) Hadoop (1) HTML&CSS (38) IS (25) Java (87) Leet Code (4) PHP (20) Projects (1) Python (218) R (69) Selenium Webdriver (2) Software (14) SQL (27)