当前位置:网站首页>One line of keyboard
One line of keyboard
2022-06-24 05:55:00 【Boundless universe PY】
class Solution:
# Parameters words For a list of strings
# Returns a list of strings
def findWords(self, words):
res = []
s = [“qwertyuiop”, “asdfghjkl”, “zxcvbnm”]
for w in words:
for j in range(3):
flag = 1
for i in w:
if i.lower() not in s[j]:
flag = 0
break
if flag == 1:
res.append(w)
break
return res
# The main function
if name == ‘main’:
word = [“Hello”, “Alaska”, “Dad”, “Peace”]
s = Solution()
print(“ Input is :”,word)
print(“ Output is :”,s.findWords(word))
边栏推荐
- How to build a website after registering a domain name? Can individuals register domain names to build websites?
- Material production tool manual
- Resourcequota for detailed explanation of kubernetes resource constraints
- Summary of basic notes of C language (2)
- What are the benefits of deploying a private cloud platform for the enterprise?
- What is domain name resolution? How much does domain name registration cost
- What is a Chinese domain name? What are the types of Chinese domain names?
- Supply chain innovation of industrial Internet -- supply chain +5g Technology
- Kubernetes configures two ways of hot update
- "Yi Jian Xing" was "Internet stormed". What countermeasures does the game company have other than "rather be broken jade"?
猜你喜欢
随机推荐
How to set the secondary domain name of the website? What should I pay attention to when setting the domain name?
What are the stages from tradition to Tencent cloud
Go's package management learning notes
Realization of data transmission between a and B computers by using single chip microcomputer serial port
What is domain name registration? Do you still need to purchase ECS after domain name registration?
How to resolve the primary domain name and how to operate it
A high-end router antenna connection mechanism that can simultaneously deploy and store antennas
Playing "honey in snow and ice city" with single chip microcomputer
How do users in the insurance upgrade industry choose?
How to build a website with a domain name? Can I build a website before applying for a domain name?
How to build a website with a domain name? What are the precautions for website construction?
What is a Chinese domain name? What are the types of Chinese domain names?
How to do domain name resolution? What does domain name resolution mean?
A network box that can adjust the outlet according to the router antenna position
How to build a website after registering a domain name? Can individuals register domain names to build websites?
Increase the dynamic port range to solve TCPIP alarm
How to renew the domain name when it expires
C51 single chip microcomputer, an entry-level tutorial for lighting up small lights
What does it mean that the domain name is being walled? How to solve the problem of domain name by wall?
Tencent security monthly report - Tencent security has been selected into several authoritative research reports, a data security special committee has been established, and zero trust specifications