4
Vérifier si une chaîne commence par XXXX
Je voudrais savoir comment vérifier si une chaîne commence par "bonjour" en Python. Dans Bash, je fais habituellement: if [[ "$string" =~ ^hello ]]; then do something here fi Comment puis-je obtenir la même chose en Python?