12 2025 档案
摘要:写代码,有如下变量name=' aleX',please inplement each function as required name =' aleX' print(name.strip())## remove the space on both side, and print the resu
阅读全文
摘要:输入姑娘的年龄后,进行以下判断: 如果姑娘小于18岁,打印“未成年” 如果姑娘大于18岁小于25岁,打印“表白” 如果姑娘大于25岁小于45岁,打印“阿姨好” 如果姑娘大于45岁,打印“奶奶好” # age=input('请输入年龄') # age=int(age) # if age<18: # p
阅读全文
摘要:使用格式化的三种方式输出自己的name、height、weight 第一种占用符方式 name=input('name>>>') height=input('height>>>') weight=input('weight>>>') print('My name is %s,My height is
阅读全文
摘要:简述python的垃圾回收机制 当一个变量值的引用计数为0时,python会将其在内存占用回收 对于以下代码 x=10 y=10 z=10 del y 10的引用计数为多少 由于10位于python的最小整数池中所以10的引用计数为2+1=3 x=257 y=x del x z=257 x对应的变量
阅读全文
浙公网安备 33010602011771号