hi
int the below code:
I read somewhere something before it, but i can not understand it. can you explain it?
thanks
int the below code:
def something(num,my_list): num=3 my_list[0]=3 a=2 b=[2] something(a,b) print(a) # 2 is printed print(b) #[3] is printedthe value of a in the final is the same as before, but the b value has changed. Why?
I read somewhere something before it, but i can not understand it. can you explain it?
thanks