Commit 67178879 by BellCodeEditor

auto save

parent c20f0945
Showing with 125 additions and 0 deletions
# a=['2','4','14123','a']
# # b=['audi','Bmw','Volvo','bentian','a']#根据首字母序号升序,区分大小写,大写在前
# a.sort()#默认升序。
# # b.sort()#默认升序。
# print(a)
# # print(b)
# sort(reverse,key=func)
# def func(e):
# return len(e)
# b.sort(key=func)
# b.sort(reverse=True,key=func)
# print(b)
# def func(e):
# return e['year']
# cars.sort(key=func)
# cars.sort(reverse=True,key=func)
# print(cars)
# append()
# insert()
# remove()
# pop()
# del a[1]
# clear()
# count()
# index()
# extend()
# a=[1,2,3]
# a.apeend()
# a='hello orld'
# a=a.split('o')
# b=''.join(a)
# print(type(b))
# print(type(a))
# car={
# 'car1':'audi',
# 'year1':193,
# 'car2':'vlovo',
# 'year2':1992
# }
# print(len(car))
# car['car2']='bmw'#修改
# car['year3']=2022#新建
# for i in car:
# print(i)#键
# print(car[i])#值
# for i in car.values():
# print(i)#键
# #print(car[i])#值
# for i,j in car.items():
# print(i,j)#键
#print(car[i])#值
# print(car)
# sum=0
# for j in range(2,102):
# for i in range(1,j):
# sum=sum+i
# print(sum)
# for i in range(31):
# if i*4+(30-i)*2==80:
# print('兔子'+str(i)+'鸡'+str(30-i))
# thisdict = {
# "brand": "Porsche",
# "model": "911",
# "year": 1963
# }
# thisdict.pop("model")
# print(thisdict)
# myfamily = {
# "child1" : {
# "name" : "Phoebe Adele",
# "year" : 2002
# },
# "child2" : {
# "name" : "Jennifer Katharine",
# "year" : 1996
# },
# "child3" : {
# "name" : "Rory John",
# "year" : 1999
# }
# }
# for i in myfamily.values():
# print(i['year'])
# for i in myfamily:
# print(myfamily[i]['year'])
a={1,2,3,4,5,8}#集合是不重复的无序
b={1,3,2,5,4,8}
# print(a)
# print(len(a))
# for i in a:
# print(i)
# if a==b:
# print('woshi ')
print(a)
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment