Python standard library: Replacing text with regexps using re.sub and re.subn

preview_player
Показать описание


Subscribe to this channel, as I try to go through all of the Python standard library!
Рекомендации по теме
Комментарии
Автор

not gonna lie, regex has been the hardest part of my coding journey so far. you explain this concept really well though, I was getting confused as to when I should use this vs. str.replace

ProdbyTrehnt
Автор

How would this work if you had a string list = 'abbcdef', but i want to sub only the second occurrence of 'b' ---> 'ab*cdef'

LemonadeStand