View Single Post
Old 03-17-2015, 08:51 PM   #12
phossler
Wizard
phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.phossler ought to be getting tired of karma fortunes by now.
 
Posts: 1,087
Karma: 447222
Join Date: Jan 2009
Location: Valley Forge, PA, USA
Device: Kindle Paperwhite
@DiapDealer --

Could you please explain the syntax, grammar, and punctuation of the function?

I read this ...

https://docs.python.org/2.7/library/...ght=sub#re.sub

but still don't get it

The match.group(3) and the space{2,} I recognize, then things like

r'''something''' i.e. why the r and 3 single quotes?

return .... i.e. I can figure out the {0}, etc. but why in ' ....' and what is the .format for?

In case you haven't realized, my understanding of python is zilch

I am trying to figure out enough to cookbook some other functions

Thanks
phossler is offline   Reply With Quote