[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/mlecjm/programmingWithPythonCode/main/variables/variable_types.py [Back]  [Original]

int_var = 1 + 7  # Create an integer variable holding an integer number.
print(type(int_var))  # This prints "".

float_var = 3.0  # 3.0 is a float and it is stored in float_var.
print(type(float_var))  # This prints "".

str_var = f"f{float_var = }"  # Render an f-string into str_var.
print(type(str_var))  # This prints "".

bool_var = (1 == 0)  # 1 == 0 is False, so a bool is stored in bool_var.
print(type(bool_var))  # This prints "".

none_var = None  # We create none_var which, well, holds None.
print(type(none_var))  # This prints "".

Web Proxy Viewer  |  New URL  |  Original Page