Web: EdmontonPy.com
Twitter: @EdmontonPy
Slack: devedmonton.slack.com
#meetup-edmontonpy
YouTube: Dev Edmonton
Looking for a job? Looking to hire great people?
Please visit #opportunities at devedmonton.slack.com
>>> some_string = '[PERSON] Len Strousand'
>>> some_string.removeprefix('PERSON') # Strict substring matching
'[PERSON] Len Strousand'
>>> some_string.removeprefix('[PERSON] ') # Note the whitspace
'Len Strousand'
>>> some_string.removeprefix('[PERSON]').split() # Chaining
['Len', 'Strousand']
lstrip() versus removeprefix()
>>> 'Arthur: three!'.lstrip('Arthur: ') # Character set recursively applied
'ee!'
>>> 'Arthur: three!'.removeprefix('Arthur: ') # Substring applied once
'three!'
str.removeprefix() and str.removesuffix()
are standard starting in Python 3.9!
Information Retrieval:
A simple search service
Daniel Zhou
Message one of @aaron.yong, @abram, @data-get
or visit #meetup-edmontonpy on Dev Edmonton Slack
Beginners are encouraged
A talk just has to do with Python in some way 🐍
A Pictionary-like game