Commit 2a9e5d87 by BellCodeEditor

auto save

parent 0cc37ad4
Showing with 46 additions and 0 deletions
#1 2 3 4 5 6 7 8 9 10...10
#-=+ 删除 添加
# 字母去重排序
# 在一列表中产生n个大写字母,删除其中重复字母,
# 并按照A到Z顺序排列输出。同时输出删除字母个数。
# 例如输入 5 随机产生原始字母:[ "D","H","K","E","H"]
# 输出:去重后字母排序:["D","E","H","K"]
# 输出:共删除字母个数:1个。
# 请编写程序实现上述功能,或补全代码。
#- + 2
# 8
# 2 3 4 6 7 8 10 11 12 14 15
# # 需要 0 4 8 12 16
# # 实际 0 3 6 9 12
# a=list(range(1,101))
# b=[]
# while len(a)>1:
# for i in range(1,len(a),2):
# b.append(a[i])
# a=b
# b=[]
# print(a)
# a=input('shuru')
# b=a.split(' ')
# c=[]
# for i in b:
# c.append(int(i))
# def b(e):
# return e%2==1
# a=list(filter(b,list(map(int,input("输入数字").split(' ')))))
# print(a)
#增删改查
a=[1,2,3,4] #列表名[索引]
# for i in range(4): #[0,1,2,3]
# print(a[i])
# for i in a:
# print(i)
i=0
while i<len(a):
print(a[i])
i=i+1
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