Built-in Methods for Python Data Types
Mutable and Immutable Data Types
In Python, data types are categorized into mutable (modifiable after creation) and immutable (unmodifiable after creation) types. This classification replaces the traditional "pass-by-value" or "pass-by-reference" distinction in other languages.
Immutable Data Types
Immutable types include st ...
Posted on Tue, 22 Sep 2026 16:43:09 +0000 by imstupid
Essential Built-in Methods for Strings and Lists in Programming
Built-in Methods for Numeric Types (int and float)
The int() and float() functions are used for type creation and conversion.
# Type definition
age = 10 # Equivalent to age = int(10)
salary = 3000.3 # Equivalent to salary = float(3000.3)
# Type conversion
s = '123'
res = int(s) # Converts string of integers to int
print(res, type(res)) # O ...
Posted on Sat, 25 Jul 2026 16:46:40 +0000 by simwiz