[Python] comparer 2 strings qui sont des int
Résolu
tata-titi
Messages postés
42
Date d'inscription
Statut
Membre
Dernière intervention
-
tata-titi -
tata-titi -
Bonjour,
Dans une liste de string j'ai un int et voudrait faire un test sur celui-ci pour le comparer a une valeur ...
Mais je ne peux pas faire int(ce_fameux_string) !
Comment puis-je m'en sortir ???
---------
Merci !!!
---------
Dans une liste de string j'ai un int et voudrait faire un test sur celui-ci pour le comparer a une valeur ...
Mais je ne peux pas faire int(ce_fameux_string) !
Comment puis-je m'en sortir ???
---------
Merci !!!
---------
A voir également:
- [Python] comparer 2 strings qui sont des int
- Supercopier 2 - Télécharger - Gestion de fichiers
- Citizen code python - Accueil - Outils
- 2 ecran pc - Guide
- Quelles sont les 2 orientations possibles d'une page d’un document numérique ? - Guide
- Faire 2 colonnes sur word - Guide
2 réponses
_int = int(...)
int(x[, base]) -> integer
Convert a string or number to an integer, if possible. A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!) When converting a string, use
the optional base. It is an error to supply a base when converting a
non-string.
int(x[, base]) -> integer
Convert a string or number to an integer, if possible. A floating point
argument will be truncated towards zero (this does not include a string
representation of a floating point number!) When converting a string, use
the optional base. It is an error to supply a base when converting a
non-string.