python小问题,为什么运行出来y和y1[1,2,3]?
defmy_function(x,y):x.append(5)y=y+[5]x=[1,2,3]x1=xx2=x[:]y=[1,2,3]y1=yy2=y[:]my_func...
def my_function(x, y):
x.append(5)
y = y + [5]
x = [1, 2, 3]
x1 = x
x2 = x[:]
y = [1, 2, 3]
y1 = y
y2 = y[:]
my_function(x, y) 展开
x.append(5)
y = y + [5]
x = [1, 2, 3]
x1 = x
x2 = x[:]
y = [1, 2, 3]
y1 = y
y2 = y[:]
my_function(x, y) 展开
3个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询