Correct syntax for pathological re.search()

Pieter van Oostrum pieter-l at vanoostrum.org
Tue Oct 8 13:50:14 EDT 2024


ram at zedat.fu-berlin.de (Stefan Ram) writes:

> "Michael F. Stemper" <michael.stemper at gmail.com> wrote or quoted:
>
> path = r'C:\Windows\example' + '\\'
>
You could even omit the '+'. Then the concatenation is done at parsing time instead of run time.
-- 
Pieter van Oostrum <pieter at vanoostrum.org>
www: http://pieter.vanoostrum.org/
PGP key: [8DAE142BE17999C4]


More information about the Python-list mailing list