Outils pour utilisateurs

Outils du site


python:maths:start

Ceci est une ancienne révision du document !


Maths

Convertir une chaîne de caractères en float sous python

En testant si c'est possible

try:
     float(s)
     print('True')
except:
    print('False')

donne

3.1415
True
python/maths/start.1570894513.txt.gz · Dernière modification : (modification externe)