How to Check If a Python String Contains a Number — CODEFATHER

Knowing how to check if a Python string contains a number can be something you will have to do at some point in your application.

A simple approach to check if a Python string contains a number is to verify every character in the string using the string isdigit() method. Once that’s done we get a list of booleans and if any of its elements is True that means