Strings
Category: Memory
Arrays(4)
Constants(1)
Dictionaries(2)
List(7)
Tuple(1)
Buffers
Move buffer down one place Move buffer up one place
static variables inside a function
In C a static variable inside a function is only visible inside that function’s scope, but its lifetime is the entire life of the program, and it’s only initialized once. There is NO equivalence in Python. So if you want to be a proper python programmer you should just accept that! Use a class, use […]
typedef enum in Python
In C you might do this to create an automatically numbered from 0 list of values for example: In python you can do the same it with the Enum class Using Enum values
Global
Variables and objects created outside of a function are global and can be read (not written) by any function The global keyword can be used to create a global object inside a function. The global keyword must be used inside a function if it wants to change the value of a global object inside the […]
malloc
Temporary memory example
Naming conventions in Python
Whilst you can do what you want, the creators of Python specify naming conventions that should be followed: ClassNamesInStudlyCaps CONSTANTS_IN_ALL_CAPS variable_names_in_snake_case method_names_in_snake_case function_names_in_snake_case
Variables
float / double Python’s built-in float type has double precision (it’s the same as a double in C)