diff --git a/_sources/materials/18-WrapUp.ipynb b/_sources/materials/18-WrapUp.ipynb index b58f31f2..ea65acdd 100755 --- a/_sources/materials/18-WrapUp.ipynb +++ b/_sources/materials/18-WrapUp.ipynb @@ -566,8 +566,9 @@ }, "outputs": [], "source": [ - "# can just search for a letter\n", - "re.findall('o', my_string)" + "# can just search for a letter - note that the 'r' in front of the string \n", + "# changes it to a \"raw string literal\", needed to avoid complaints by re when using backslashes\n", + "re.findall(r'o', my_string)" ] }, { @@ -581,7 +582,7 @@ "outputs": [], "source": [ "# but the patterns are where these shine\n", - "re.findall('\\d\\d', my_string)" + "re.findall(r'\\d\\d', my_string)" ] }, { diff --git a/materials/18-WrapUp.html b/materials/18-WrapUp.html index 22195cc2..7fa7c1e5 100755 --- a/materials/18-WrapUp.html +++ b/materials/18-WrapUp.html @@ -746,8 +746,9 @@