How do you check for numbers in Python and what do u need to import | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How do you check for numbers in Python and what do u need to import

Python password validation

31st Mar 2020, 7:18 PM
David Afolabi
David Afolabi - avatar
1 Answer
+ 1
import the module re and use either r"\d" or r"[1-9]" to express numbers, for more information check the Regular expressions sololearn module in python.
31st Mar 2020, 7:23 PM
Mo Hani
Mo Hani - avatar