Skip to content

Instantly share code, notes, and snippets.

@maur1th
Last active May 25, 2016 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maur1th/1cbeb6e406e9ac668360b846e0087058 to your computer and use it in GitHub Desktop.
Save maur1th/1cbeb6e406e9ac668360b846e0087058 to your computer and use it in GitHub Desktop.
>>> 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