Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python - Comment vérifier une corde contient un nombre

str1 = "python1" str2 = "nonumber" str3 = "12345"  print(any(chr.isdigit() for chr in str1)) print(any(chr.isdigit() for chr in str2)) print(any(chr.isdigit() for chr in str3)) 
Source by www.codeprofesseur.fr #
 
PREVIOUS NEXT
Tagged: #Python #Comment #une #corde #contient #nombre
ADD COMMENT
Topic
Name
7+5 =