python one line


  • 0
    S
    from collections import Counter
    class Solution(object):
        def checkRecord(self, s):
            """
            :type s: str
            :rtype: bool
            """
            return (Counter(s)['A'] <=1 and 'LLL' not in s)
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.