|
206 | 206 |
|
207 | 207 | <a href="javascript:" id="return-to-top"><i class="icon-chevron-up"></i></a>
|
208 | 208 | <div><h1 id="comprehensivepythoncheatsheet">Comprehensive Python Cheatsheet</h1><p class="banner"><sup><a href="https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md">Download text file</a>, <a href="https://github.com/gto76/python-cheatsheet">Fork me on GitHub</a> or <a href="https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions">Check out FAQ</a>.
|
209 |
| -</sup></p><p class="banner"><img src="web/image_888.jpeg" alt="Monty Python"></p><br></div> |
210 |
| - |
211 |
| - |
212 |
| - |
213 |
| - |
214 |
| -<div><h2 id="toc"><a href="#toc" name="toc">#</a>Contents</h2><pre><code class="hljs bash"><strong>ToC</strong> = { |
| 209 | +</sup></p><p class="banner"><img src="web/image_888.jpeg" alt="Monty Python"></p><br><div><h2 id="toc"><a href="#toc" name="toc">#</a>Contents</h2><pre><code class="hljs bash"><strong>ToC</strong> = { |
215 | 210 | <strong><span class="hljs-string"><span class="hljs-string">'1. Collections'</span></span></strong>: [<a href="#list">List</a>, <a href="#dictionary">Dictionary</a>, <a href="#set">Set</a>, <a href="#tuple">Tuple</a>, <a href="#range">Range</a>, <a href="#enumerate">Enumerate</a>, <a href="#iterator">Iterator</a>, <a href="#generator">Generator</a>],
|
216 | 211 | <strong><span class="hljs-string"><span class="hljs-string">'2. Types'</span></span></strong>: [<a href="#type">Type</a>, <a href="#string">String</a>, <a href="#regex">Regular_Exp</a>, <a href="#format">Format</a>, <a href="#numbers">Numbers</a>, <a href="#combinatorics">Combinatorics</a>, <a href="#datetime">Datetime</a>],
|
217 | 212 | <strong><span class="hljs-string"><span class="hljs-string">'3. Syntax'</span></span></strong>: [<a href="#arguments">Args</a>, <a href="#inline">Inline</a>, <a href="#closure">Closure</a>, <a href="#decorator">Decorator</a>, <a href="#class">Class</a>, <a href="#ducktypes">Duck_Types</a>, <a href="#enum">Enum</a>, <a href="#exceptions">Exceptions</a>],
|
|
221 | 216 | <strong><span class="hljs-string"><span class="hljs-string">'7. Libraries'</span></span></strong>: [<a href="#progressbar">Progress_Bar</a>, <a href="#plot">Plot</a>, <a href="#table">Table</a>, <a href="#curses">Curses</a>, <a href="#logging">Logging</a>, <a href="#scraping">Scraping</a>, <a href="#web">Web</a>, <a href="#profile">Profile</a>,
|
222 | 217 | <a href="#numpy">NumPy</a>, <a href="#image">Image</a>, <a href="#audio">Audio</a>]
|
223 | 218 | }
|
224 |
| -</code></pre></div> |
| 219 | +</code></pre></div></div> |
| 220 | + |
| 221 | + |
| 222 | + |
| 223 | + |
| 224 | + |
225 | 225 |
|
226 | 226 | <div><h2 id="main"><a href="#main" name="main">#</a>Main</h2><pre><code class="python language-python hljs"><span class="hljs-keyword">if</span> __name__ == <span class="hljs-string">'__main__'</span>: <span class="hljs-comment"># Runs main() if file wasn't imported.</span>
|
227 | 227 | main()
|
|
1873 | 1873 | </code></pre></div>
|
1874 | 1874 |
|
1875 | 1875 | <p><br><br></p>
|
1876 |
| -<div><h1 id="libraries">Libraries</h1></div> |
1877 |
| -<div><h2 id="progressbar"><a href="#progressbar" name="progressbar">#</a>Progress Bar</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install tqdm</span> |
| 1876 | +<div><h1 id="libraries">Libraries</h1><div><h2 id="progressbar"><a href="#progressbar" name="progressbar">#</a>Progress Bar</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install tqdm</span> |
1878 | 1877 | <span class="hljs-keyword">from</span> tqdm <span class="hljs-keyword">import</span> tqdm
|
1879 | 1878 | <span class="hljs-keyword">from</span> time <span class="hljs-keyword">import</span> sleep
|
1880 | 1879 | <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> tqdm([<span class="hljs-number">1</span>, <span class="hljs-number">2</span>, <span class="hljs-number">3</span>]):
|
1881 | 1880 | sleep(<span class="hljs-number">0.2</span>)
|
1882 | 1881 | <span class="hljs-keyword">for</span> i <span class="hljs-keyword">in</span> tqdm(range(<span class="hljs-number">100</span>)):
|
1883 | 1882 | sleep(<span class="hljs-number">0.02</span>)
|
1884 |
| -</code></pre></div> |
| 1883 | +</code></pre></div></div> |
| 1884 | + |
1885 | 1885 |
|
1886 | 1886 | <div><h2 id="plot"><a href="#plot" name="plot">#</a>Plot</h2><pre><code class="python language-python hljs"><span class="hljs-comment"># $ pip3 install matplotlib</span>
|
1887 | 1887 | <span class="hljs-keyword">from</span> matplotlib <span class="hljs-keyword">import</span> pyplot
|
|
0 commit comments