Please enable JavaScript.
Coggle requires JavaScript to display documents.
Dictionary, List, Tuples, Basics, Methods, Code Points, try-except,…
-
List
Copy a list:
list1 = list2 | both lists point to same memory. id(list1 == id(list2)) Any change in list1 or list2 will affect both lists.
-
-
pop() - returns the value deleted. By default, removes the last element from the list.
-
-
Slicing [start(inclusive): end(exclusive) : step] We can run the list in both sides from left to rght and from right to left.
when a list contains other lists as elements, we refer to the outer list as the parent and the inner as the child or nested list.
-
allow multiple assignment x[0], x[1] = x[2], x[0]
-
-
Tuples
-
-
-
One single element in a tuple, requires "," Example: tuple(1, )
-
-
-
-
-
-
pyc
-
pre-compiled files. Improves performance of python to skip the compilation step and directly execute the pre-compiled bytecode.
-
-