@ -258,7 +258,7 @@ index = <list>.index(<el>) <span class="hljs-comment"># Returns
< / code > < / pre >
< div > < h2 id = "dictionary" > < a href = "#dictionary" name = "dictionary" > #< / a > Dictionary< / h2 > < pre > < code class = "python language-python hljs" > < view> = < dict> .keys() < span class = "hljs-comment" > # Coll. of keys that reflects changes.< / span >
< view> = < dict> .values() < span class = "hljs-comment" > # Coll. of values that reflects changes.< / span >
< view> = < dict> .items() < span class = "hljs-comment" > # Coll. of key-value tuples.< / span >
< view> = < dict> .items() < span class = "hljs-comment" > # Coll. of key-value tuples that reflects chgs .< / span >
< / code > < / pre > < / div >
< pre > < code class = "python language-python hljs" > value = < dict> .get(key, default=< span class = "hljs-keyword" > None< / span > ) < span class = "hljs-comment" > # Returns default if key is missing.< / span >
@ -378,8 +378,8 @@ to_exclusive = <range>.stop
< li > < strong > Everything is an object.< / strong > < / li >
< li > < strong > Every object has a type.< / strong > < / li >
< li > < strong > Type and class are synonymous.< / strong > < / li >
< / ul > < pre > < code class = "python language-python hljs" > < type> = type(< el> ) < span class = "hljs-comment" > # Or: < el> .__class__< / span >
< bool> = isinstance(< el> , < type> ) < span class = "hljs-comment" > # Or: issubclass(type(< el> ), < type> )< / span >
< / ul > < pre > < code class = "python language-python hljs" > < type> = type(< el> ) < span class = "hljs-comment" > # Or: < el> .__class__< / span >
< bool> = isinstance(< el> , < type> ) < span class = "hljs-comment" > # Or: issubclass(type(< el> ), < type> )< / span >
< / code > < / pre > < / div >
@ -473,11 +473,11 @@ to_exclusive = <range>.stop
< li > < strong > Use < code class = "python hljs" > < span class = "hljs-string" > r'\1'< / span > < / code > or < code class = "python hljs" > < span class = "hljs-string" > '\\1'< / span > < / code > for backreference.< / strong > < / li >
< li > < strong > Add < code class = "python hljs" > < span class = "hljs-string" > '?'< / span > < / code > after an operator to make it non-greedy.< / strong > < / li >
< / ul >
< div > < h3 id = "matchobject" > Match Object< / h3 > < pre > < code class = "python language-python hljs" > < str> = < Match> .group() < span class = "hljs-comment" > # W hole match. Also group(0).< / span >
< str> = < Match> .group(< span class = "hljs-number" > 1< / span > ) < span class = "hljs-comment" > # P art in first bracket.< / span >
< tuple> = < Match> .groups() < span class = "hljs-comment" > # A ll bracketed parts.< / span >
< int> = < Match> .start() < span class = "hljs-comment" > # S tart index of a match.< / span >
< int> = < Match> .end() < span class = "hljs-comment" > # E xclusive end index of a match.< / span >
< div > < h3 id = "matchobject" > Match Object< / h3 > < pre > < code class = "python language-python hljs" > < str> = < Match> .group() < span class = "hljs-comment" > # Returns w hole match. Also group(0).< / span >
< str> = < Match> .group(< span class = "hljs-number" > 1< / span > ) < span class = "hljs-comment" > # Returns p art in first bracket.< / span >
< tuple> = < Match> .groups() < span class = "hljs-comment" > # Returns a ll bracketed parts.< / span >
< int> = < Match> .start() < span class = "hljs-comment" > # Returns s tart index of a match.< / span >
< int> = < Match> .end() < span class = "hljs-comment" > # Returns e xclusive end index of a match.< / span >
< / code > < / pre > < / div >
< div > < h3 id = "specialsequences" > Special Sequences< / h3 > < ul >
@ -558,8 +558,8 @@ to_exclusive = <range>.stop
+---------------+-----------------+-----------------+-----------------+-----------------+
< / code > < / pre >
< div > < h3 id = "ints" > Ints< / h3 > < pre > < code class = "python language-python hljs" > {< span class = "hljs-number" > 90< / span > :c} < span class = "hljs-comment" > # 'Z'< / span >
{< span class = "hljs-number" > 90< / span > :X} < span class = "hljs-comment" > # '5A'< / span >
{< span class = "hljs-number" > 90< / span > :b} < span class = "hljs-comment" > # '1011010'< / span >
{< span class = "hljs-number" > 90< / span > :X} < span class = "hljs-comment" > # '5A'< / span >
< / code > < / pre > < / div >
< div > < h2 id = "numbers" > < a href = "#numbers" name = "numbers" > #< / a > Numbers< / h2 > < div > < h3 id = "types" > Types< / h3 > < pre > < code class = "python language-python hljs" > < int> = int(< float/str/bool> ) < span class = "hljs-comment" > # Or: math.floor(< float> )< / span >