Below is a python script you can copy and run that will illustrate how, inside a function that takes an argument, how that argument behaves depends both on type it is and whether it is rebound or not. This is intended to provide explicit examples of how Python is neither "pass-by-value" nor "pass-by-reference", but instead something more complicated, which is commonly called "pass-by-object-reference".
# This is extended from asking claude about if python is pass-by-val or -by-ref, the answer being "neither, it's complicated and something else called pass-by-obj-ref"
#
# # Immutable types: int, float, str, tuple
# - These basically work like "pass-by-value" where an entirely new obj is created inside the func, independent of the outer scope:
def immu_pbv_int(x):
x = x + 1 # creates a new int object, rebinds local x
print(f"INSIDE immu_pbv_int: {x} ")