#print(3>4 or 4<3 and 1&#61;&#61;1)
# f or f
# f
# x or y x为真&#xff0c;返回x,否则返回y
# x and y x为真&#xff0c;返回y&#xff0c;否则返回x
#print(2 > 1 and 0)
#print(1 <2 and 3 <4 or 1>2)
# t or f
# t
#print(2 > 1 and 3 <4 or 4 > 5 and 2 <1)
#t or f
#t
#print(1 > 2 and 3 <4 or 4 > 5 and 2 > 1 or 9 <8)
#f or f or f
#f
#print(1 > 1 and 3 <4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 <6)
# f or f or f
#f
#print(not 2 > 1 and 3 <4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 <6)
#f or f or f
#f
#1-2&#43;3-4...&#43;99除88以外的所有数的总和
# sum &#61; 0
# count &#61; 0
# while count <99:
# count &#43;&#61; 1 #输出1-99
# #print(count)
# if count &#61;&#61; 88:
# continue
# if count % 2 &#61;&#61; 0:
# sum -&#61; count
# else:
# sum &#43;&#61; count
# print(sum)
#
# digit &#61; 3 #计次
# while digit > 0:
# username &#61; input(&#39;请输入账号>>>&#39;)
# if username &#61;&#61; &#39;%s&#39;%username :
# print(&#39;账号输入正确&#xff01;&#39;)
# user &#61; username
# password &#61; input(&#39;请输入密码>>>&#39;)
# if password &#61;&#61; &#39;jun&#39;:
# print(&#39;&#39;&#39;登录成功&#xff01;
# 您的账号为%s
# 您的密码为%s&#39;&#39;&#39;%(username,password))
# break
# else:
# digit -&#61; 1
# print(&#39;密码输入有误&#xff0c;请重新输入&#xff0c;您还有%s次机会&#39; %digit)
#
#
# else:
# digit -&#61; 1
# print(&#39;账号输入有误&#xff0c;请重新输入&#xff0c;您还有%s次机会&#39;%digit)
# else:
# print(&#39;要点脸行不&#xff01;&#39;)
# s &#61; input(&#39;>>&#39;)
# if s:
# print(&#39;bu为空&#39;)
# else:print(&#39;为空&#39;)
# s &#61; input(&#39;>>>&#39;)
#
# for x in s:
# if not x.isdigit():#如果x不是数字
# s &#61; s.replace(x,&#39; &#39;) #把不是数字的替换成空格
#
# s1 &#61; s.split(&#39; &#39;) #分割文本
# print(s1)
# sum &#61; 0
# for x in s1:
# if x.isdigit(): #如果是数字&#xff0c;就自加
# sum &#43;&#61; int(x)
#
# print(sum)
# li &#61; [&#39;alex&#39;,&#39;wusir&#39;,&#39;eric&#39;,&#39;rain&#39;,&#39;alex&#39;]
# print(len(li))
# li.append(&#39;seven&#39;)
# print(li)
# li.insert(0,&#39;tony&#39;)
# print(li)
# li[1] &#61; &#39;Kelly&#39;
# l2 &#61; [1,&#39;a&#39;,3,4,&#39;heart&#39;]
# li.extend(l2)
# s &#61; &#39;qwert&#39;
# li.extend(s)
# del li[1:4]
# li.reverse()
# print(li.count(&#39;alex&#39;))
# li &#61; [1,3,2,&#39;a&#39;,4,&#39;b&#39;,5,&#39;c&#39;]
# l1 &#61; li[0:3]
# l1.sort()
# l1 &#61; li[3:-2]
# l1 &#61; li[0:-1:2]
# l1 &#61; li[1:-2:2]
# l1 &#61; li[-1:]
# l1 &#61; li[-3:0:-2]
# li &#61; [2,3,&#39;k&#39;,[&#39;qwe&#39;,20,[&#39;k1&#39;,[&#39;tt&#39;,3,&#39;1&#39;]],89],&#39;ab&#39;,&#39;adv&#39;]
# li[3][2][1][0] &#61; li[3][2][1][0].upper()
# li[3][2][1][0] &#61; &#39;TT&#39;
# 5,查找列表li中的元素&#xff0c;移除每个元素的空格&#xff0c;
# 并找出以’A’或者’a’开头&#xff0c;并以’c’结尾的所有元素&#xff0c;
# 并添加到一个新列表中,最后循环打印这个新列表。
# li &#61; [&#39;taibai &#39;,&#39;alexC&#39;,&#39;AbC &#39;,&#39;egon&#39;,&#39; Ritian&#39;,&#39; Wusir&#39;,&#39; aqc&#39;]
# l1 &#61; []
# for x in li:
# i &#61; x.strip() #查找列表li中的元素&#xff0c;移除每个元素的空格
# s &#61; i.lower()
# print(s)
# if s.startswith(&#39;a&#39;) and s.endswith(&#39;c&#39;): #并找出以’A’或者’a’开头&#xff0c;并以’c’结尾的所有元素&#xff0c;
# l1.append(i)
# print(l1)
# 6、开发敏感词语过滤程序&#xff0c;提示用户输入评论内容&#xff0c;如果用户输入的内容中包含特殊的字符&#xff1a;
# 敏感词列表 li &#61; ["苍老师","东京热",”武藤兰”,”波多野结衣”]
# 则将用户输入的内容中的敏感词汇替换成***&#xff0c;并添加到一个列表中&#xff1b;
# 如果用户输入的内容没有敏感词汇&#xff0c;则直接添加到上述的列表中。
# li &#61; ["苍老师","东京热","武藤兰","波多野结衣"]
# new_li &#61;[]
# s &#61; input(&#39;>>>>&#39;)
# for x in li:
# if x in s:
# s &#61; s.replace(x,&#39;*&#39;*len(x))
# print(s)
# new_li.append(s)
#
# print(new_li)