For better understanding here is a example code.
num = 0
def func(num):
num += 1
func(num)
print(num)
This code prints 0 but I want 1(incremented by func()), how can I do that?
How can I do that? Is it possible?
Long story short, you can't just put number in function and expect it to be passed by reference.
In python...
You should visit here for more info about "Pass(call) by Object Reference".
https://www.geeksforgeeks.org/is-python-call-by-reference-or-call-by-value/