摘要:
代码: list=["hello","world"] for i in list: print(i) things=["苹果","香蕉","橙子","梨子","猕猴桃","柚子","猴魁","铁观音","毛笔","宣纸"] for j in range(10): print(j,":",things 阅读全文
摘要:
代码: object=["石榴",1,"香蕉","橙子","梨子","石榴"] object1=object print(object) print(set(object1)) object[0]="苹果" del object[1] print(object) object.append(15) 阅读全文
摘要:
代码: #!/usr/bin/env python #_*_ coding:utf-8 _*_ import random import time import os print("你好,现在你有10秒的时间记忆下列物品及其编号") things=["苹果","香蕉","橙子","梨子","猕猴桃" 阅读全文
摘要:
代码: age=int(input("Your age is:")) HRrest=float(input("Your HRrest is:")) gender=str(input ("Your gender is:")) if gender=="male": n=220 else: n=210 l 阅读全文
摘要:
代码: lista=[20,40,30,50,10] listb=["bb","ee","aa","dd","cc"] #lista.sort() listc=sorted(lista) listd=sorted(lista,reverse=True) liste=sorted(listb) lis 阅读全文