Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Solution:
- def findWords(self, words: list[str]) -> list[str]:
- rows = (set("qwertyuiop"), set("asdfghjkl"), set("zxcvbnm"))
- return [w for w in words if any(set(w.lower()).issubset(row) for row in rows)]
Advertisement
Add Comment
Please, Sign In to add comment