import re
text1 = '@0'
text2 = '0'
print(text1, text1.startswith('@'))
print(text2, text2.startswith('@'))
print(text1, bool(re.match('^@', text1)))
print(text2, bool(re.match('^@', text2)))
print(text1, text1[:1] == '@')
print(text2, text2[:1] == '@')
# @0 True
# 0 False
# @0 True
# 0 False
# @0 True
# 0 False
from itertools import product
for s in product('ATGC', repeat=3):
print(s)
'''
('A', 'T', 'G')
('A', 'T', 'C')
('A', 'G', 'A')
('A', 'G', 'T')
('A', 'G', 'G')
...
'''
async def on_member_join(member):
if cursor.execute(f"SELECT id FROM users WHERE id = {member.id}").fetchone() is None:
cursor.execute(f"INSERT INTO users VALUES ('{member}', {member.id}, 0, 0, 1)")
connection.commit()
else:
pass
from itertools import product
print(list(product('1234567890', repeat=3)))