Python Revision Notes
3. Data Types
-
Numeric:
int,float,complex -
Sequence:
list,tuple,range,str -
Mapping:
dict -
Set types:
set,frozenset -
Boolean:
True,False -
NoneType:
None
4. Variables & Input/Output
Numeric: int, float, complex
Sequence: list, tuple, range, str
Mapping: dict
Set types: set, frozenset
Boolean: True, False
NoneType: None
x = 10 # variable
y = input("Enter: ") # input (string type by default)
z = int(y) # typecasting
print("Result:", z + x)
Comments
Post a Comment