Ancien Responsable Matière Moustache Posted March 26, 2021 Ancien Responsable Matière Share Posted March 26, 2021 Coucou, Comment Python arrive à partir de ce programme https://zupimages.net/viewer.php?id=21/12/ghkx.gif à savoir que le a du mot chat est avant dans l'alphabet que le i du mot chien. La partie si mot1 < mot2 aurait très bien pu être compris par le logiciel comme "longueur du mot" par exemple et non pas comme ordre dans l'alphabet Quote Link to comment Share on other sites More sharing options...
Solution Shrex Posted March 26, 2021 Solution Share Posted March 26, 2021 il y a 7 minutes, Moustache a dit : Coucou, Comment Python arrive à partir de ce programme https://zupimages.net/viewer.php?id=21/12/ghkx.gif à savoir que le a du mot chat est avant dans l'alphabet que le i du mot chien. La partie si mot1 < mot2 aurait très bien pu être compris par le logiciel comme "longueur du mot" par exemple et non pas comme ordre dans l'alphabet Saluuuuut ! En fait y a pas 50 explications possibles, quand tu compares 2 chaines de caractères avec python ça va comparer leur ordre "lexicographique", l'ordre du dictionnaire. En fait c'est python qui marche comme ça... c'est tout... Quote Link to comment Share on other sites More sharing options...
Ancien Responsable Matière Moustache Posted March 26, 2021 Author Ancien Responsable Matière Share Posted March 26, 2021 Coucou, @Shrex Super merci :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.