Skip to content

Commit 8f90ad7

Browse files
third python tip
1 parent 9ec63c0 commit 8f90ad7

File tree

9 files changed

+271
-11
lines changed

9 files changed

+271
-11
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ I'm addicted to reading fantasy/sci-fi books, so I have a [blog](https://learnby
4343

4444
## Tips
4545

46+
* [Python tip: 3](https://learnbyexample.github.io/tips/python-tip-3/)
4647
* [Vim tip: 1](https://learnbyexample.github.io/tips/vim-tip-1/)
4748
* [CLI tip: 2](https://learnbyexample.github.io/tips/cli-tip-2/)
4849
* [Python tip: 2](https://learnbyexample.github.io/tips/python-tip-2/)

atom.xml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,38 @@
55
<link href="https://learnbyexample.github.io/atom.xml" rel="self" type="application/atom+xml"/>
66
<link href="https://learnbyexample.github.io"/>
77
<generator uri="https://www.getzola.org/">Zola</generator>
8-
<updated>2021-12-08T00:00:00+00:00</updated>
8+
<updated>2021-12-14T00:00:00+00:00</updated>
99
<id>https://learnbyexample.github.io/atom.xml</id>
10+
<entry xml:lang="en">
11+
<title>Python tip: 3</title>
12+
<published>2021-12-14T00:00:00+00:00</published>
13+
<updated>2021-12-14T00:00:00+00:00</updated>
14+
<link href="https://learnbyexample.github.io/tips/python-tip-3/" type="text/html"/>
15+
<id>https://learnbyexample.github.io/tips/python-tip-3/</id>
16+
<content type="html">&lt;p&gt;In case you haven&#x27;t yet discovered this awesome &lt;strong&gt;f-string&lt;&#x2F;strong&gt; feature, you can add &lt;code&gt;=&lt;&#x2F;code&gt; after an expression to get both the expression and the result in the output.&lt;&#x2F;p&gt;
17+
&lt;pre style=&quot;background-color:#f5f5f5;&quot;&gt;
18+
&lt;code&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;num1 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;42
19+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;num2 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;7
20+
21+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;{num1 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+ &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;num2 = }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;
22+
&amp;#39;num1 + num2 = 49&amp;#39;
23+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;{num1 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+ &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(num2 &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;* &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;10&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;) = }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;
24+
&amp;#39;num1 + (num2 * 10) = 112&amp;#39;
25+
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
26+
&lt;p&gt;I use it often to quickly test a function:&lt;&#x2F;p&gt;
27+
&lt;pre style=&quot;background-color:#f5f5f5;&quot;&gt;
28+
&lt;code&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;background-color:#562d56bf;color:#f8f8f8;&quot;&gt;def&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;isodd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(n):
29+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;... &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;return &lt;&#x2F;span&gt;&lt;span style=&quot;color:#a2a001;&quot;&gt;bool&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(n &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;% &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;2&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;)
30+
...
31+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b39f04;&quot;&gt;print&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;isodd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;42&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;) = }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;)
32+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;isodd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;42&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;False
33+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b39f04;&quot;&gt;print&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;f&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;{&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;isodd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;123&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;) = }&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;)
34+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;isodd&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;123&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;) &lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;= &lt;&#x2F;span&gt;&lt;span style=&quot;color:#b3933a;&quot;&gt;True
35+
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
36+
&lt;p&gt;&lt;img src=&quot;&#x2F;images&#x2F;info.svg&quot; alt=&quot;info&quot; &#x2F;&gt; See &lt;a href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;library&#x2F;string.html#formatstrings&quot;&gt;docs.python: Format String Syntax&lt;&#x2F;a&gt; and &lt;a href=&quot;https:&#x2F;&#x2F;docs.python.org&#x2F;3&#x2F;reference&#x2F;lexical_analysis.html#formatted-string-literals&quot;&gt;docs.python: Formatted string literals&lt;&#x2F;a&gt; for documentation and examples.&lt;&#x2F;p&gt;
37+
&lt;p&gt;&lt;img src=&quot;&#x2F;images&#x2F;info.svg&quot; alt=&quot;info&quot; &#x2F;&gt; See my &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;100_page_python_intro&quot;&gt;100 Page Python Intro&lt;&#x2F;a&gt; ebook for a short, introductory guide for the Python programming language.&lt;&#x2F;p&gt;
38+
</content>
39+
</entry>
1040
<entry xml:lang="en">
1141
<title>Vim tip: 1</title>
1242
<published>2021-12-08T00:00:00+00:00</published>
@@ -2574,7 +2604,7 @@ no VAL is specified, the key will be given the value true.&lt;&#x2F;p&gt;
25742604
<entry xml:lang="en">
25752605
<title>Python regular expression cheatsheet and examples</title>
25762606
<published>2020-07-03T00:00:00+00:00</published>
2577-
<updated>2020-11-12T00:00:00+00:00</updated>
2607+
<updated>2021-12-14T00:00:00+00:00</updated>
25782608
<link href="https://learnbyexample.github.io/python-regex-cheatsheet/" type="text/html"/>
25792609
<id>https://learnbyexample.github.io/python-regex-cheatsheet/</id>
25802610
<content type="html">&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;&#x2F;images&#x2F;books&#x2F;pyregex_example.png&quot; alt=&quot;pyregex example&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
@@ -2613,9 +2643,9 @@ no VAL is specified, the key will be given the value true.&lt;&#x2F;p&gt;
26132643
&lt;tr&gt;&lt;td&gt;&lt;code&gt;+&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match one or more times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26142644
&lt;tr&gt;&lt;td&gt;&lt;code&gt;?&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match zero or one times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26152645
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{m,n}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match &lt;code&gt;m&lt;&#x2F;code&gt; to &lt;code&gt;n&lt;&#x2F;code&gt; times (inclusive)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
2616-
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{m,}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match at least m times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
2646+
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{m,}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match at least &lt;code&gt;m&lt;&#x2F;code&gt; times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26172647
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{,n}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match up to &lt;code&gt;n&lt;&#x2F;code&gt; times (including &lt;code&gt;0&lt;&#x2F;code&gt; times)&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
2618-
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{n}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match exactly n times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
2648+
&lt;tr&gt;&lt;td&gt;&lt;code&gt;{n}&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;Match exactly &lt;code&gt;n&lt;&#x2F;code&gt; times&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26192649
&lt;tr&gt;&lt;td&gt;&lt;code&gt;pat1.*pat2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;any number of characters between &lt;code&gt;pat1&lt;&#x2F;code&gt; and &lt;code&gt;pat2&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26202650
&lt;tr&gt;&lt;td&gt;&lt;code&gt;pat1.*pat2|pat2.*pat1&lt;&#x2F;code&gt;&lt;&#x2F;td&gt;&lt;td&gt;match both &lt;code&gt;pat1&lt;&#x2F;code&gt; and &lt;code&gt;pat2&lt;&#x2F;code&gt; in any order&lt;&#x2F;td&gt;&lt;&#x2F;tr&gt;
26212651
&lt;&#x2F;tbody&gt;&lt;&#x2F;table&gt;
@@ -2891,6 +2921,10 @@ mission success
28912921
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7f8989;&quot;&gt;# swap words that are separated by a comma
28922922
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;re.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#aeb52b;&quot;&gt;\w&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;),(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#aeb52b;&quot;&gt;\w&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;\2&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;,&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;\1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;good,bad 42,24&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;)
28932923
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;bad,good 24,42&amp;#39;
2924+
2925+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7f8989;&quot;&gt;# example with both capturing and non-capturing groups
2926+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;&amp;gt;&amp;gt;&amp;gt; &lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;re.&lt;&#x2F;span&gt;&lt;span style=&quot;color:#5597d6;&quot;&gt;sub&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#aeb52b;&quot;&gt;\d&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;)(?:abc)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;(&lt;&#x2F;span&gt;&lt;span style=&quot;color:#aeb52b;&quot;&gt;\d&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;+&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;)&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#668f14;&quot;&gt;r&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;\2&lt;&#x2F;span&gt;&lt;span style=&quot;color:#7c8f4c;&quot;&gt;:&lt;&#x2F;span&gt;&lt;span style=&quot;color:#72ab00;&quot;&gt;\1&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;, &lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;2abcabc42 12abcd21&amp;#39;&lt;&#x2F;span&gt;&lt;span style=&quot;color:#1f1f1f;&quot;&gt;)
2927+
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;42:2 12abcd21&amp;#39;
28942928
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
28952929
&lt;ul&gt;
28962930
&lt;li&gt;using functions in replacement section of &lt;code&gt;re.sub&lt;&#x2F;code&gt;&lt;&#x2F;li&gt;
@@ -2958,7 +2992,7 @@ mission success
29582992
&lt;&#x2F;span&gt;&lt;span style=&quot;color:#d07711;&quot;&gt;&amp;#39;Hi there. Nice day&amp;#39;
29592993
&lt;&#x2F;span&gt;&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;&lt;br&gt;
29602994
&lt;h2 id=&quot;python-re-gex-book&quot;&gt;Python re(gex)? book&lt;a class=&quot;zola-anchor&quot; href=&quot;#python-re-gex-book&quot; aria-label=&quot;Anchor link for: python-re-gex-book&quot;&gt;🔗&lt;&#x2F;a&gt;&lt;&#x2F;h2&gt;
2961-
&lt;p&gt;Visit my repo &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;py_regular_expressions&quot;&gt;Python re(gex)?&lt;&#x2F;a&gt; for details about the book I wrote on Python regular expressions. The ebook uses plenty of examples to explain the concepts from the very beginning and step by step introduces more advanced concepts. The book also covers the &lt;a href=&quot;https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;regex&#x2F;&quot;&gt;third party module regex&lt;&#x2F;a&gt;. The cheatsheet and examples presented in this post are based on contents of this book.&lt;&#x2F;p&gt;
2995+
&lt;p&gt;Visit my GitHub repo &lt;a href=&quot;https:&#x2F;&#x2F;github.com&#x2F;learnbyexample&#x2F;py_regular_expressions&quot;&gt;Python re(gex)?&lt;&#x2F;a&gt; for details about the book I wrote on Python regular expressions. The ebook uses plenty of examples to explain the concepts from the very beginning and step by step introduces more advanced concepts. The book also covers the &lt;a href=&quot;https:&#x2F;&#x2F;pypi.org&#x2F;project&#x2F;regex&#x2F;&quot;&gt;third party module regex&lt;&#x2F;a&gt;. The cheatsheet and examples presented in this post are based on contents of this book.&lt;&#x2F;p&gt;
29622996
&lt;p&gt;Use &lt;a href=&quot;https:&#x2F;&#x2F;leanpub.com&#x2F;py_regex&#x2F;c&#x2F;P7erPYAm1386&quot;&gt;this leanpub link&lt;&#x2F;a&gt; for a discounted price.&lt;&#x2F;p&gt;
29632997
&lt;p align=&quot;center&quot;&gt;&lt;img src=&quot;&#x2F;images&#x2F;books&#x2F;pyregex.png&quot; alt=&quot;Python regex book cover image&quot; &#x2F;&gt;&lt;&#x2F;p&gt;
29642998
</content>

0 commit comments

Comments
 (0)