| Python Basic |
| 1 | dir(obj) |
| 2 | from imp import reload; reload(script) |
| 3 | import math; math.sqrt(100) |
| 4 | import random; random.choise((1, 2, 3, 4)) |
| 5 | import random; random.random() |
| 6 | import re; re.match().group(1) |
| 7 | len(obj) |
| 8 | str.capitalize() |
| 9 | str.casefold() |
| 10 | str.center(10) |
| 11 | str.count('a') |
| 12 | str.encode('cp1251') |
| 13 | str.encode('utf8') |
| 14 | str.endswith('a') |
| 15 | str.expandtabs() |
| 16 | str.find('a') |
| 17 | str.format() |
| 18 | str.index('a') |
| 19 | str.isalnum() |
| 20 | str.isalpha() |
| 21 | str.isdecimal() |
| 22 | str.isdigit() |
| 23 | str.islower() |
| 24 | str.isnumeric() |
| 25 | str.istitle() |
| 26 | str.isupper() |
| 27 | str.join('asdf') |
| 28 | str.ljust(20) |
| 29 | str.lower() |
| 30 | str.lstrip('a') |
| 31 | str.replace('a', 'b') |
| 32 | str.rfind('a') |
| 33 | str.rindex('a') |
| 34 | str.rjust(10) |
| 35 | str.rsplit('a') |
| 36 | str.rstrip('a') |
| 37 | str.startswith('a') |
| 38 | str.strip('a') |
| 39 | str.swapcase() |
| 40 | str.title() |
| 41 | str.upper() |
| 42 | str.zfill(10) |
Комментарии