diff --git a/README.md b/README.md index dea7a7e..3c27fb6 100644 --- a/README.md +++ b/README.md @@ -286,11 +286,6 @@ String = textwrap.wrap(, width) # Nicely breaks string into lines. ``` -```python - = bin() # Binary representation starting with '0b'. - = hex() # Hexadecimal representation starting with '0x'. -``` - ### Char ```python = chr() # Converts int to unicode char. @@ -445,6 +440,14 @@ from random import random, randint, choice, shuffle shuffle() ``` +### Bin, Hex +```python + = 0b # Or: 0x + = int('0b', 0) # Or: int('0x', 0) + = int('', 2) # Or: int('', 16) +'0b' = bin() # Or: '0x' = hex() +``` + Combinatorics ------------- diff --git a/index.html b/index.html index f6f1972..eb08931 100644 --- a/index.html +++ b/index.html @@ -389,9 +389,6 @@ Point(x=1, y=2
<bool> = <str>.isnumeric()                   # True if str contains only numeric characters.
 <list> = textwrap.wrap(<str>, width)         # Nicely breaks string into lines.
 
-
<str>  = bin(<int>)                          # Binary representation starting with '0b'.
-<str>  = hex(<int>)                          # Hexadecimal representation starting with '0x'.
-

Char

<str> = chr(<int>)  # Converts int to unicode char.
 <int> = ord(<str>)  # Converts unicode char to int.
@@ -503,6 +500,12 @@ Point(x=1, y=2
 <el>    = choice(<list>)
 shuffle(<list>)
 
+

Bin, Hex

+
<int>     = 0b<bin>            # Or: 0x<hex>
+<int>     = int('0b<bin>', 0)  # Or: int('0x<hex>', 0)
+<int>     = int('<bin>', 2)    # Or: int('<hex>', 16)
+'0b<bin>' = bin(<int>)         # Or: '0x<bin>' = hex(<int>)
+

#Combinatorics

  • Every function returns an iterator.