1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
import sys sys.path.append('/Users/chenyushao/Desktop/python_draft/python基础知识第3版') from 牌 import *
deck_1 = deck
deck = ['a','b','c'] print('deck_1 is :',deck_1) print(deck)
print('~~~~~~~~~ \n')
a = [1,2,3] print('a id:',id(a)) b = a a = [2,4,5] print('b id:',id(b)) print('a 再赋值后的 id:',id(a)) print(b)
aa = [1,2,3] print('aa id:',id(aa)) bb = aa aa[0] = 100 print('bb id:',id(bb)) print('aa 修改后的id :',id(aa)) print(bb)
a_ = 5 print('a ID is :' ,id(a_)) b_ = a_ print('b id is :',id(b_)) c_ = 5 print('c id is :',id(c_)) d_ = 5 print('d id is :',id(d_))
|