# for i in range(5):
# for j in range(5):
# print(i,j)
# import re
# def rm():
# a = ' 1 2 3 4 5 '
# b = a.replace(' ',"")
# print(b)
# rm()
# a = ' 1 2 3 4 5 '
# b= ""
# for i in a:
# if i != ' ':
# b += i
# print(b)
# #列表里任何东西都可以放入到列表中,列表里也可以插入
# a = [1, 2, 3]
# # a.__iter__ 可以循环 插入值在索引之前插入
# a.insert(1,400)
# 列表去重
# a = [1,1,2,2,3]
# c = []
# print(b)
# for i in a:
# if i not in c:
# c.append(i)
# print(c)
# b = list(set(a))
# 列表加列表
# 移除列表
小例子# 进度条 ##2%
# import time
# s = '#'
# for seconds in range(1,101):
# time.sleep(1)
# print('%s %d%%
'% (s*seconds,seconds),end="",flush=True)
# 列表取反
# a = [1,2,3]
# print(a[::-1])
# a.reverse()
# print(a)
# 列表排序 字母排序使用acii码值
# a = [9,6,10,22,5]
# print(sorted(a)) # 默认排序是升序
# print(sorted(a)[::-1])
# print(sorted(a,reverse=True))
# 冒泡排序
# for i in range(len(a)):
# for j in range(len(a)-1):
# if a[j] > a[j+1]:
# b = a[j]
# a[j] = a[j+1]
# a[j+1] = b
# print(a)
# list1 = [['zqq',150],['q',5],['w',1],['d',200]]
# print(sorted(list1))
# print(sorted(list1,key=lambda x:x[1]))
# list1 = [['zqq',150,[10,20]],['q',5,[30,55]],['w',1,[66,1]],['d',200,[654,8]]]
# print(sorted(list1,key=lambda x:x[2][1]))
# f = [x for x in range(100) if x % 2 == 0]
# print(f)
# f = [x + y for x in 'ABCD' for y in '1234']
# print(f)
# def joker():
# for i in range(10):
# yield i
# # print(joker())
# a = joker()
# print (next(a))
# print (next(a))
# 元组不可以直接修改里面的元素
# a = [1,2,3]
# b = tuple(a)
# c = (1,2,3)
# d = c + c
# e = c * 10
# print(b)
# print(d)
# print(e)
# 请求 多线程
# 集合 确定性 互异性(去重) 无序性
# 罗素悖论
# 集合里面不可以套集合 集合里面可以套元组但是不可以套列表
a = {1,2,3,1}
print(a)
a.remove(100)# 不存在报错
a.discard(100)# 不存在不报错
# 对称差是交集的补集