Last active
May 25, 2016 14:08
-
-
Save maur1th/1cbeb6e406e9ac668360b846e0087058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> s = "Roses are red. Violets are blue.".split(".") | |
>>> s | |
['Roses are red', ' Violets are blue', ''] | |
>>> len(s) | |
3 | |
>>> | |
>>> # Pour faire plus clair : | |
... # Si ta str ne comprend qu'un caractère et que ce caractère est ton séparateur, alors tu obtiens deux ensembles (ici des str) vides | |
... ".".split(".") | |
['', ''] | |
>>> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment