פייתון/פייתון גרסה 3/העתקים: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
אין תקציר עריכה
שורה 98:
 
<source lang = "python">
#Declaration - creatcreates a new variablevariables
>>> a=400
>>> b=400
שורה 129:
 
x=[1,3,2]
y=x[:] #shadowdeep copy
z=x # assigning
 
print(x is y) # Flase - "is" cheackcheacks if 'x' and 'y' has the same location in the memory
print(x is z) #true
print(x==y) #true - cheack if the vaules of x,y are the same!