Skip to content

Instantly share code, notes, and snippets.

@tsal

tsal/moarExample output.md

Last active Aug 31, 2019
Embed
What would you like to do?
strings are first class
>>> ",".join("get all the words as a list then make them a csv".split())
'get,all,the,words,as,a,list,then,make,them,a,csv'
"inline string separated by spaces".split()
",".join("get all the words as a list then make them a csv".split())
>>> long = "this is a longsep string with sep as a separator"
>>> short = "strings,are,first,class,in,python"
>>>
>>> print(long.split("sep"))
['this is a long', ' string with ', ' as a ', 'arator']
>>>
>>> print(short.split(","))
['strings', 'are', 'first', 'class', 'in', 'python']
long = "this is a longsep string with sep as a separator"
short = "strings,are,first,class,in,python"
print(long.split("sep"))
print(short.split(","))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment