Created
December 28, 2019 16:52
-
-
Save skyopensource/d162994c9efb60456d54b1a96e1f7d54 to your computer and use it in GitHub Desktop.
Created on Cognitive Class Labs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"3.6.7 | packaged by conda-forge | (default, Nov 6 2019, 16:19:42) \n", | |
"[GCC 7.3.0]\n" | |
] | |
} | |
], | |
"source": [ | |
"import sys\n", | |
"print(sys.version)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"This is test\n", | |
"This is test\n" | |
] | |
} | |
], | |
"source": [ | |
"print(\"This is test\")\n", | |
"print(r\"This is test\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"This is the string\n", | |
"THIS IS THE STRING\n", | |
"That IS THE STRING\n", | |
"12\n" | |
] | |
} | |
], | |
"source": [ | |
"a = \"This is the string\"\n", | |
"print(a)\n", | |
"b = a.upper()\n", | |
"print(b)\n", | |
"c =b.replace('THIS', 'That')\n", | |
"print(c)\n", | |
"print(c.find('STRING'))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Help on list object:\n", | |
"\n", | |
"class list(object)\n", | |
" | list() -> new empty list\n", | |
" | list(iterable) -> new list initialized from iterable's items\n", | |
" | \n", | |
" | Methods defined here:\n", | |
" | \n", | |
" | __add__(self, value, /)\n", | |
" | Return self+value.\n", | |
" | \n", | |
" | __contains__(self, key, /)\n", | |
" | Return key in self.\n", | |
" | \n", | |
" | __delitem__(self, key, /)\n", | |
" | Delete self[key].\n", | |
" | \n", | |
" | __eq__(self, value, /)\n", | |
" | Return self==value.\n", | |
" | \n", | |
" | __ge__(self, value, /)\n", | |
" | Return self>=value.\n", | |
" | \n", | |
" | __getattribute__(self, name, /)\n", | |
" | Return getattr(self, name).\n", | |
" | \n", | |
" | __getitem__(...)\n", | |
" | x.__getitem__(y) <==> x[y]\n", | |
" | \n", | |
" | __gt__(self, value, /)\n", | |
" | Return self>value.\n", | |
" | \n", | |
" | __iadd__(self, value, /)\n", | |
" | Implement self+=value.\n", | |
" | \n", | |
" | __imul__(self, value, /)\n", | |
" | Implement self*=value.\n", | |
" | \n", | |
" | __init__(self, /, *args, **kwargs)\n", | |
" | Initialize self. See help(type(self)) for accurate signature.\n", | |
" | \n", | |
" | __iter__(self, /)\n", | |
" | Implement iter(self).\n", | |
" | \n", | |
" | __le__(self, value, /)\n", | |
" | Return self<=value.\n", | |
" | \n", | |
" | __len__(self, /)\n", | |
" | Return len(self).\n", | |
" | \n", | |
" | __lt__(self, value, /)\n", | |
" | Return self<value.\n", | |
" | \n", | |
" | __mul__(self, value, /)\n", | |
" | Return self*value.\n", | |
" | \n", | |
" | __ne__(self, value, /)\n", | |
" | Return self!=value.\n", | |
" | \n", | |
" | __new__(*args, **kwargs) from builtins.type\n", | |
" | Create and return a new object. See help(type) for accurate signature.\n", | |
" | \n", | |
" | __repr__(self, /)\n", | |
" | Return repr(self).\n", | |
" | \n", | |
" | __reversed__(...)\n", | |
" | L.__reversed__() -- return a reverse iterator over the list\n", | |
" | \n", | |
" | __rmul__(self, value, /)\n", | |
" | Return value*self.\n", | |
" | \n", | |
" | __setitem__(self, key, value, /)\n", | |
" | Set self[key] to value.\n", | |
" | \n", | |
" | __sizeof__(...)\n", | |
" | L.__sizeof__() -- size of L in memory, in bytes\n", | |
" | \n", | |
" | append(...)\n", | |
" | L.append(object) -> None -- append object to end\n", | |
" | \n", | |
" | clear(...)\n", | |
" | L.clear() -> None -- remove all items from L\n", | |
" | \n", | |
" | copy(...)\n", | |
" | L.copy() -> list -- a shallow copy of L\n", | |
" | \n", | |
" | count(...)\n", | |
" | L.count(value) -> integer -- return number of occurrences of value\n", | |
" | \n", | |
" | extend(...)\n", | |
" | L.extend(iterable) -> None -- extend list by appending elements from the iterable\n", | |
" | \n", | |
" | index(...)\n", | |
" | L.index(value, [start, [stop]]) -> integer -- return first index of value.\n", | |
" | Raises ValueError if the value is not present.\n", | |
" | \n", | |
" | insert(...)\n", | |
" | L.insert(index, object) -- insert object before index\n", | |
" | \n", | |
" | pop(...)\n", | |
" | L.pop([index]) -> item -- remove and return item at index (default last).\n", | |
" | Raises IndexError if list is empty or index is out of range.\n", | |
" | \n", | |
" | remove(...)\n", | |
" | L.remove(value) -> None -- remove first occurrence of value.\n", | |
" | Raises ValueError if the value is not present.\n", | |
" | \n", | |
" | reverse(...)\n", | |
" | L.reverse() -- reverse *IN PLACE*\n", | |
" | \n", | |
" | sort(...)\n", | |
" | L.sort(key=None, reverse=False) -> None -- stable sort *IN PLACE*\n", | |
" | \n", | |
" | ----------------------------------------------------------------------\n", | |
" | Data and other attributes defined here:\n", | |
" | \n", | |
" | __hash__ = None\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"A = [\"abcd\", 1, 2]\n", | |
"help(A)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 23, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"Help on list object:\n", | |
"\n", | |
"class list(object)\n", | |
" | list() -> new empty list\n", | |
" | list(iterable) -> new list initialized from iterable's items\n", | |
" | \n", | |
" | Methods defined here:\n", | |
" | \n", | |
" | __add__(self, value, /)\n", | |
" | Return self+value.\n", | |
" | \n", | |
" | __contains__(self, key, /)\n", | |
" | Return key in self.\n", | |
" | \n", | |
" | __delitem__(self, key, /)\n", | |
" | Delete self[key].\n", | |
" | \n", | |
" | __eq__(self, value, /)\n", | |
" | Return self==value.\n", | |
" | \n", | |
" | __ge__(self, value, /)\n", | |
" | Return self>=value.\n", | |
" | \n", | |
" | __getattribute__(self, name, /)\n", | |
" | Return getattr(self, name).\n", | |
" | \n", | |
" | __getitem__(...)\n", | |
" | x.__getitem__(y) <==> x[y]\n", | |
" | \n", | |
" | __gt__(self, value, /)\n", | |
" | Return self>value.\n", | |
" | \n", | |
" | __iadd__(self, value, /)\n", | |
" | Implement self+=value.\n", | |
" | \n", | |
" | __imul__(self, value, /)\n", | |
" | Implement self*=value.\n", | |
" | \n", | |
" | __init__(self, /, *args, **kwargs)\n", | |
" | Initialize self. See help(type(self)) for accurate signature.\n", | |
" | \n", | |
" | __iter__(self, /)\n", | |
" | Implement iter(self).\n", | |
" | \n", | |
" | __le__(self, value, /)\n", | |
" | Return self<=value.\n", | |
" | \n", | |
" | __len__(self, /)\n", | |
" | Return len(self).\n", | |
" | \n", | |
" | __lt__(self, value, /)\n", | |
" | Return self<value.\n", | |
" | \n", | |
" | __mul__(self, value, /)\n", | |
" | Return self*value.\n", | |
" | \n", | |
" | __ne__(self, value, /)\n", | |
" | Return self!=value.\n", | |
" | \n", | |
" | __new__(*args, **kwargs) from builtins.type\n", | |
" | Create and return a new object. See help(type) for accurate signature.\n", | |
" | \n", | |
" | __repr__(self, /)\n", | |
" | Return repr(self).\n", | |
" | \n", | |
" | __reversed__(...)\n", | |
" | L.__reversed__() -- return a reverse iterator over the list\n", | |
" | \n", | |
" | __rmul__(self, value, /)\n", | |
" | Return value*self.\n", | |
" | \n", | |
" | __setitem__(self, key, value, /)\n", | |
" | Set self[key] to value.\n", | |
" | \n", | |
" | __sizeof__(...)\n", | |
" | L.__sizeof__() -- size of L in memory, in bytes\n", | |
" | \n", | |
" | append(...)\n", | |
" | L.append(object) -> None -- append object to end\n", | |
" | \n", | |
" | clear(...)\n", | |
" | L.clear() -> None -- remove all items from L\n", | |
" | \n", | |
" | copy(...)\n", | |
" | L.copy() -> list -- a shallow copy of L\n", | |
" | \n", | |
" | count(...)\n", | |
" | L.count(value) -> integer -- return number of occurrences of value\n", | |
" | \n", | |
" | extend(...)\n", | |
" | L.extend(iterable) -> None -- extend list by appending elements from the iterable\n", | |
" | \n", | |
" | index(...)\n", | |
" | L.index(value, [start, [stop]]) -> integer -- return first index of value.\n", | |
" | Raises ValueError if the value is not present.\n", | |
" | \n", | |
" | insert(...)\n", | |
" | L.insert(index, object) -- insert object before index\n", | |
" | \n", | |
" | pop(...)\n", | |
" | L.pop([index]) -> item -- remove and return item at index (default last).\n", | |
" | Raises IndexError if list is empty or index is out of range.\n", | |
" | \n", | |
" | remove(...)\n", | |
" | L.remove(value) -> None -- remove first occurrence of value.\n", | |
" | Raises ValueError if the value is not present.\n", | |
" | \n", | |
" | reverse(...)\n", | |
" | L.reverse() -- reverse *IN PLACE*\n", | |
" | \n", | |
" | sort(...)\n", | |
" | L.sort(key=None, reverse=False) -> None -- stable sort *IN PLACE*\n", | |
" | \n", | |
" | ----------------------------------------------------------------------\n", | |
" | Data and other attributes defined here:\n", | |
" | \n", | |
" | __hash__ = None\n", | |
"\n" | |
] | |
} | |
], | |
"source": [ | |
"help([\"A\", 1,2])" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 24, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Raj', 'Kumar', 'Rao']\n" | |
] | |
} | |
], | |
"source": [ | |
"A = [\"Raj\", \"Kumar\", \"Rao\"]\n", | |
"print(A)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 25, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Bhim', 'Kumar', 'Rao']\n" | |
] | |
} | |
], | |
"source": [ | |
"A[0] = \"Bhim\"\n", | |
"print(A)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 26, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Kumar', 'Rao']\n" | |
] | |
} | |
], | |
"source": [ | |
"del(A[0])\n", | |
"print(A)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 28, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['hard', 'rock', 'cafe']" | |
] | |
}, | |
"execution_count": 28, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"newList = \"hard rock cafe\".split()\n", | |
"newList" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 30, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"3" | |
] | |
}, | |
"execution_count": 30, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"len(newList)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 32, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['1', '2', '3', '4', '5', '6', '7', '8', '9']\n", | |
"9\n" | |
] | |
} | |
], | |
"source": [ | |
"secList = \"1,2,3,4,5,6,7,8,9\".split(\",\")\n", | |
"print(secList)\n", | |
"print(len(secList))" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 33, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"thirdList = secList" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 34, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['1', '2', '3', '4', '5', '6', '7', '8', '9']\n" | |
] | |
} | |
], | |
"source": [ | |
"print(thirdList)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 35, | |
"metadata": {}, | |
"outputs": [], | |
"source": [ | |
"secList[0] = \"Raju\"" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 36, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Raju', '2', '3', '4', '5', '6', '7', '8', '9']\n" | |
] | |
} | |
], | |
"source": [ | |
"print(secList)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 37, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Raju', '2', '3', '4', '5', '6', '7', '8', '9']\n" | |
] | |
} | |
], | |
"source": [ | |
"print(thirdList)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 40, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"['Raju', '2', '3', '4', '5', '6', '7', '8', '9']\n", | |
"['Bhola', '2', '3', '4', '5', '6', '7', '8', '9']\n" | |
] | |
} | |
], | |
"source": [ | |
"#Clone the list\n", | |
"cloneList = secList[:]\n", | |
"print(cloneList)\n", | |
"secList[0] = \"Bhola\"\n", | |
"print(secList)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 41, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"11\n", | |
"22\n", | |
"33\n" | |
] | |
} | |
], | |
"source": [ | |
"A=['1','2','3']\n", | |
"\n", | |
"for a in A:\n", | |
"\n", | |
" print(2*a)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 42, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__abs__',\n", | |
" '__add__',\n", | |
" '__and__',\n", | |
" '__bool__',\n", | |
" '__ceil__',\n", | |
" '__class__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__divmod__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__float__',\n", | |
" '__floor__',\n", | |
" '__floordiv__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__index__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__int__',\n", | |
" '__invert__',\n", | |
" '__le__',\n", | |
" '__lshift__',\n", | |
" '__lt__',\n", | |
" '__mod__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__neg__',\n", | |
" '__new__',\n", | |
" '__or__',\n", | |
" '__pos__',\n", | |
" '__pow__',\n", | |
" '__radd__',\n", | |
" '__rand__',\n", | |
" '__rdivmod__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rfloordiv__',\n", | |
" '__rlshift__',\n", | |
" '__rmod__',\n", | |
" '__rmul__',\n", | |
" '__ror__',\n", | |
" '__round__',\n", | |
" '__rpow__',\n", | |
" '__rrshift__',\n", | |
" '__rshift__',\n", | |
" '__rsub__',\n", | |
" '__rtruediv__',\n", | |
" '__rxor__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__sub__',\n", | |
" '__subclasshook__',\n", | |
" '__truediv__',\n", | |
" '__trunc__',\n", | |
" '__xor__',\n", | |
" 'bit_length',\n", | |
" 'conjugate',\n", | |
" 'denominator',\n", | |
" 'from_bytes',\n", | |
" 'imag',\n", | |
" 'numerator',\n", | |
" 'real',\n", | |
" 'to_bytes']" | |
] | |
}, | |
"execution_count": 42, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(int)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 43, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__add__',\n", | |
" '__class__',\n", | |
" '__contains__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getitem__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__iter__',\n", | |
" '__le__',\n", | |
" '__len__',\n", | |
" '__lt__',\n", | |
" '__mod__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__new__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rmod__',\n", | |
" '__rmul__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__subclasshook__',\n", | |
" 'capitalize',\n", | |
" 'casefold',\n", | |
" 'center',\n", | |
" 'count',\n", | |
" 'encode',\n", | |
" 'endswith',\n", | |
" 'expandtabs',\n", | |
" 'find',\n", | |
" 'format',\n", | |
" 'format_map',\n", | |
" 'index',\n", | |
" 'isalnum',\n", | |
" 'isalpha',\n", | |
" 'isdecimal',\n", | |
" 'isdigit',\n", | |
" 'isidentifier',\n", | |
" 'islower',\n", | |
" 'isnumeric',\n", | |
" 'isprintable',\n", | |
" 'isspace',\n", | |
" 'istitle',\n", | |
" 'isupper',\n", | |
" 'join',\n", | |
" 'ljust',\n", | |
" 'lower',\n", | |
" 'lstrip',\n", | |
" 'maketrans',\n", | |
" 'partition',\n", | |
" 'replace',\n", | |
" 'rfind',\n", | |
" 'rindex',\n", | |
" 'rjust',\n", | |
" 'rpartition',\n", | |
" 'rsplit',\n", | |
" 'rstrip',\n", | |
" 'split',\n", | |
" 'splitlines',\n", | |
" 'startswith',\n", | |
" 'strip',\n", | |
" 'swapcase',\n", | |
" 'title',\n", | |
" 'translate',\n", | |
" 'upper',\n", | |
" 'zfill']" | |
] | |
}, | |
"execution_count": 43, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(str)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 44, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__add__',\n", | |
" '__class__',\n", | |
" '__contains__',\n", | |
" '__delattr__',\n", | |
" '__delitem__',\n", | |
" '__dir__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getitem__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__iadd__',\n", | |
" '__imul__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__iter__',\n", | |
" '__le__',\n", | |
" '__len__',\n", | |
" '__lt__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__new__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__reversed__',\n", | |
" '__rmul__',\n", | |
" '__setattr__',\n", | |
" '__setitem__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__subclasshook__',\n", | |
" 'append',\n", | |
" 'clear',\n", | |
" 'copy',\n", | |
" 'count',\n", | |
" 'extend',\n", | |
" 'index',\n", | |
" 'insert',\n", | |
" 'pop',\n", | |
" 'remove',\n", | |
" 'reverse',\n", | |
" 'sort']" | |
] | |
}, | |
"execution_count": 44, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(list)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 45, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__add__',\n", | |
" '__class__',\n", | |
" '__contains__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getitem__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__iter__',\n", | |
" '__le__',\n", | |
" '__len__',\n", | |
" '__lt__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__new__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rmul__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__subclasshook__',\n", | |
" 'count',\n", | |
" 'index']" | |
] | |
}, | |
"execution_count": 45, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(tuple)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 46, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__abs__',\n", | |
" '__add__',\n", | |
" '__and__',\n", | |
" '__bool__',\n", | |
" '__ceil__',\n", | |
" '__class__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__divmod__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__float__',\n", | |
" '__floor__',\n", | |
" '__floordiv__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__index__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__int__',\n", | |
" '__invert__',\n", | |
" '__le__',\n", | |
" '__lshift__',\n", | |
" '__lt__',\n", | |
" '__mod__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__neg__',\n", | |
" '__new__',\n", | |
" '__or__',\n", | |
" '__pos__',\n", | |
" '__pow__',\n", | |
" '__radd__',\n", | |
" '__rand__',\n", | |
" '__rdivmod__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rfloordiv__',\n", | |
" '__rlshift__',\n", | |
" '__rmod__',\n", | |
" '__rmul__',\n", | |
" '__ror__',\n", | |
" '__round__',\n", | |
" '__rpow__',\n", | |
" '__rrshift__',\n", | |
" '__rshift__',\n", | |
" '__rsub__',\n", | |
" '__rtruediv__',\n", | |
" '__rxor__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__sub__',\n", | |
" '__subclasshook__',\n", | |
" '__truediv__',\n", | |
" '__trunc__',\n", | |
" '__xor__',\n", | |
" 'bit_length',\n", | |
" 'conjugate',\n", | |
" 'denominator',\n", | |
" 'from_bytes',\n", | |
" 'imag',\n", | |
" 'numerator',\n", | |
" 'real',\n", | |
" 'to_bytes']" | |
] | |
}, | |
"execution_count": 46, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(bool)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 48, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__abs__',\n", | |
" '__add__',\n", | |
" '__and__',\n", | |
" '__bool__',\n", | |
" '__ceil__',\n", | |
" '__class__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__divmod__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__float__',\n", | |
" '__floor__',\n", | |
" '__floordiv__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__index__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__int__',\n", | |
" '__invert__',\n", | |
" '__le__',\n", | |
" '__lshift__',\n", | |
" '__lt__',\n", | |
" '__mod__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__neg__',\n", | |
" '__new__',\n", | |
" '__or__',\n", | |
" '__pos__',\n", | |
" '__pow__',\n", | |
" '__radd__',\n", | |
" '__rand__',\n", | |
" '__rdivmod__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rfloordiv__',\n", | |
" '__rlshift__',\n", | |
" '__rmod__',\n", | |
" '__rmul__',\n", | |
" '__ror__',\n", | |
" '__round__',\n", | |
" '__rpow__',\n", | |
" '__rrshift__',\n", | |
" '__rshift__',\n", | |
" '__rsub__',\n", | |
" '__rtruediv__',\n", | |
" '__rxor__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__sub__',\n", | |
" '__subclasshook__',\n", | |
" '__truediv__',\n", | |
" '__trunc__',\n", | |
" '__xor__',\n", | |
" 'bit_length',\n", | |
" 'conjugate',\n", | |
" 'denominator',\n", | |
" 'from_bytes',\n", | |
" 'imag',\n", | |
" 'numerator',\n", | |
" 'real',\n", | |
" 'to_bytes']" | |
] | |
}, | |
"execution_count": 48, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(True)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 49, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__abs__',\n", | |
" '__add__',\n", | |
" '__bool__',\n", | |
" '__class__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__divmod__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__float__',\n", | |
" '__floordiv__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getformat__',\n", | |
" '__getnewargs__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__int__',\n", | |
" '__le__',\n", | |
" '__lt__',\n", | |
" '__mod__',\n", | |
" '__mul__',\n", | |
" '__ne__',\n", | |
" '__neg__',\n", | |
" '__new__',\n", | |
" '__pos__',\n", | |
" '__pow__',\n", | |
" '__radd__',\n", | |
" '__rdivmod__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__rfloordiv__',\n", | |
" '__rmod__',\n", | |
" '__rmul__',\n", | |
" '__round__',\n", | |
" '__rpow__',\n", | |
" '__rsub__',\n", | |
" '__rtruediv__',\n", | |
" '__setattr__',\n", | |
" '__setformat__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__sub__',\n", | |
" '__subclasshook__',\n", | |
" '__truediv__',\n", | |
" '__trunc__',\n", | |
" 'as_integer_ratio',\n", | |
" 'conjugate',\n", | |
" 'fromhex',\n", | |
" 'hex',\n", | |
" 'imag',\n", | |
" 'is_integer',\n", | |
" 'real']" | |
] | |
}, | |
"execution_count": 49, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(float)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 50, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__class__',\n", | |
" '__contains__',\n", | |
" '__delattr__',\n", | |
" '__delitem__',\n", | |
" '__dir__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__getitem__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__iter__',\n", | |
" '__le__',\n", | |
" '__len__',\n", | |
" '__lt__',\n", | |
" '__ne__',\n", | |
" '__new__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__setattr__',\n", | |
" '__setitem__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__subclasshook__',\n", | |
" 'clear',\n", | |
" 'copy',\n", | |
" 'fromkeys',\n", | |
" 'get',\n", | |
" 'items',\n", | |
" 'keys',\n", | |
" 'pop',\n", | |
" 'popitem',\n", | |
" 'setdefault',\n", | |
" 'update',\n", | |
" 'values']" | |
] | |
}, | |
"execution_count": 50, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(dict)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 51, | |
"metadata": {}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"['__and__',\n", | |
" '__class__',\n", | |
" '__contains__',\n", | |
" '__delattr__',\n", | |
" '__dir__',\n", | |
" '__doc__',\n", | |
" '__eq__',\n", | |
" '__format__',\n", | |
" '__ge__',\n", | |
" '__getattribute__',\n", | |
" '__gt__',\n", | |
" '__hash__',\n", | |
" '__iand__',\n", | |
" '__init__',\n", | |
" '__init_subclass__',\n", | |
" '__ior__',\n", | |
" '__isub__',\n", | |
" '__iter__',\n", | |
" '__ixor__',\n", | |
" '__le__',\n", | |
" '__len__',\n", | |
" '__lt__',\n", | |
" '__ne__',\n", | |
" '__new__',\n", | |
" '__or__',\n", | |
" '__rand__',\n", | |
" '__reduce__',\n", | |
" '__reduce_ex__',\n", | |
" '__repr__',\n", | |
" '__ror__',\n", | |
" '__rsub__',\n", | |
" '__rxor__',\n", | |
" '__setattr__',\n", | |
" '__sizeof__',\n", | |
" '__str__',\n", | |
" '__sub__',\n", | |
" '__subclasshook__',\n", | |
" '__xor__',\n", | |
" 'add',\n", | |
" 'clear',\n", | |
" 'copy',\n", | |
" 'difference',\n", | |
" 'difference_update',\n", | |
" 'discard',\n", | |
" 'intersection',\n", | |
" 'intersection_update',\n", | |
" 'isdisjoint',\n", | |
" 'issubset',\n", | |
" 'issuperset',\n", | |
" 'pop',\n", | |
" 'remove',\n", | |
" 'symmetric_difference',\n", | |
" 'symmetric_difference_update',\n", | |
" 'union',\n", | |
" 'update']" | |
] | |
}, | |
"execution_count": 51, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"dir(set)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "Python", | |
"language": "python", | |
"name": "conda-env-python-py" | |
}, | |
"language_info": { | |
"codemirror_mode": { | |
"name": "ipython", | |
"version": 3 | |
}, | |
"file_extension": ".py", | |
"mimetype": "text/x-python", | |
"name": "python", | |
"nbconvert_exporter": "python", | |
"pygments_lexer": "ipython3", | |
"version": "3.6.7" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment