展开全部
那要看数据类型了,e69da5e6ba9062616964757a686964616f31333363393637int,float,str这种就是传值,list,dict,类的实例,自定义对象都是穿引用。
下面是示例代码:def change(int1,float1,str1,dict1,obj1,list1):
int1+=1
float1+=1
str1+='changed'
dict1['none_exist_key']='none_exist_value'
obj1=None
list1.append('change')
class obj:
pass
int1=0
float1=0.0
str1='origin'
dict1={'key':'value'}
obj1=obj()
list1=['only_element']
print(int1)
print(float1)
print(str1)
print(dict1)
print(obj1)
print(list1)
change(int1,float1,str1,dict1,obj1,list1)
print('after change')
print(int1)
print(float1)
print(str1)
print(dict1)
print(obj1)
print(list1)