<detailsopen><summary><strong>How to use it?</strong></summary><br>
This cheatsheet consists of minimal text and short examples so things are easy to find with <code>Ctrl+F</code> / <code>⌘F</code>. If you're on the webpage, searching for <code>'#<name>'</code> will only search for the titles. To get a link to a specific section click the grey hashtag next to the section's title before copying the address. To search for titles in the text editor use <code>^<name></code> with enabled regular expressions option.<br><br>
I also keep the Python console open at all times to test little snippets of code, to check out the available functions of a module using code completion and above all, to use <code>help(<module/object/function/type/str>)</code> command. If something is still unclear, then I search the Python docs by googling <code>'python docs <module/function>'</code>.<br><br>
Recently I started using the ptpython REPL (Python console). It supports multiline editing, syntax validation, IDE-like autocompletion and syntax highlighting. It can be installed with <code>pip3 install ptpython</code>.
Recently I started using the ptpython REPL (Python console). It supports multiline editing, syntax validation, IDE-like autocompletion and syntax highlighting. It can be installed with <code>pip3 install ptpython</code>. Even more recently I switched to ipython REPL, which is very similar to ptpython only more responsive. It can be installed with <code>pip3 install ipython</code>.
</details><br>
<detailsopen><summary><strong>What does the '<type>' signify?</strong></summary><br>
It is a placeholder for an object. It needs to be replaced by an expression, literal or a variable that returns/is of that type.
It is a placeholder for an object. It needs to be replaced by an expression, literal or a variable that returns/is of that type. However, if it is located on the left side of an assignment (<code>=</code>) then it signifies what type of object is produced/returned by the expression on the right side of the assignment.
</details><br>
<detailsopen><summary><strong>Why the '<type>' semantics?</strong></summary><br>
It makes examples much less ambiguous.
</details><br>
<detailsopen><summary><strong>Why are some basics like <code>'<list> = [<el_1>, <el_2>, ...]'</code> and <code>'<el> = <list>[<int>]'</code> missing?</strong></summary><br>
This cheatsheet is not intended for complete beginners. This way it can save some valuable space. Nonetheless, it tries to be simple enough to be useful for somebody who completed the introductory course. A nice one-page cheatsheet that can help you get started can be found <ahref="https://github.com/kickstartcoding/cheatsheets/blob/master/build/topical/python.pdf">here</a>.</details><br>
<detailsopen><summary><strong>What exactly is <code><el></code>?</strong></summary><br>
El is short for element and can be any object, but it usually denotes an object that is an item of a collection.
</details><br>
@ -52,4 +49,4 @@
<detailsopen><summary><strong>Why are descriptors not covered?</strong></summary><br>
Because property decorator is sufficient for everyday use.