관리 메뉴

솜씨좋은장씨

[leetCode] 2114. Maximum Number of Words Found in Sentences (Python) 본문

Programming/코딩 1일 1문제

[leetCode] 2114. Maximum Number of Words Found in Sentences (Python)

솜씨좋은장씨 2022. 1. 23. 00:24
728x90
반응형

코딩 1일 1문제! 오늘의 문제는 leetCode의 Maximum Number of Words Found in Sentences 입니다.

 

Maximum Number of Words Found in Sentences - LeetCode

Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview.

leetcode.com

👨🏻‍💻 코드 ( Solution )

class Solution:
    def mostWordsFound(self, sentences: List[str]) -> int:
        length_list = [len(sentence.split()) for sentence in sentences]
        
        return max(length_list)

 

GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07

1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.

github.com

Comments