摘要:
name = 'my name is {name} and i am {year} old'print(name.capitalize()) #首字母:My name alexprint(name.count("a")) #统计a :2print(name.center(50,"-")) #补足50 阅读全文
摘要:
1、浅COPY,如果源变化,p1[1][1]、p2[1][1]、person[1][1]会一起变化 import copyperson = ['name',['saving',100]]'''p1 = copy.copy(person)p2 = person[:]p3 = list(person)' 阅读全文
摘要:
product_list = [ ('IPhone',5800), ('Mac Pro',12000), ('Starbuck Latte',31), ('Alex Python',81), ('Bike',800)]shopping_list = []salary = input('Input y 阅读全文