Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Choose:
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question