Answer the question
In order to leave comments, you need to log in
How to check if there are letters and NUMBERS ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁰ in a variable?
a = str(input('> > > '))
if True:
for x in a:
if x.isdigit() == True:
#хабр не распознает некоторые из эти цифр
if x == '¹' or x == '²' or x == '³' or x == '⁴' or x == '⁵' or x == '⁶' or x == '⁷' or x == '⁸' or x == '⁹' or x == '⁰':
print(False)
else:
age = int(age)
if age <= 18 or age >= 100:
print(False)
else:
age = str(age)
print(True)
# КОД ...
else:
print(False)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question