HTMLify

LeetCode - Valid Word - Python
Views: 2 | Author: abh
class Solution:
    def isValid(self, w: str, vo="aoeuiAOEUI", co="pyfgcrldhtnsqjkxbmwvzPYFGCRLDHTNSQJKXBMWVZ", n="7531902468") -> bool:
        return len(w)>2 and any([c in vo for c in w])and any([c in co for c in w])and set(w)<set(vo+co+n)

Comments