Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
What does """ do?

Automate the Boring Stuff has a program that changes American dates to European dates. The first part of the code goes:

datePattern = re.compile(r"""\^(.\*?)

#one or two digits for the month

((0|1)?\\d)\-

#one or two dgits for the day

((0|1|2|3)?\\d)\-

#four digits for the year

((19|20)\\d\\d)

#all text after the date

(.\*?)$

""", re.VERBOSE)

I have a pretty vague idea of what everything does except for the r"""\^ part on the first line. what does """ do?

/r/Python
https://redd.it/8pghas