立即学习:https://edu.csdn.net/course/play/25505/305905?utm_source=blogtoedu
s = 'zonge is a very handsome boy'
s2 = 'very'
s3 = ''
s3 = s.replace(s2, '')
print(s3)
for i in s:
if i not in s2:
s3 = s3+i
print(s3)
for i in s:
if i in s2:
s = s.replace(i, '')
print(s)
key = True
word = input('输入一个单词:')
for i in range(len(word)):
if 'A' <= word[i] <= 'Z':
if i < len(word)-1 and word[i] == word[i+1]:
key = False
else:
key = False
if key:
print('喜欢')
else:
pass
names = ['sdf', 'dded', 'sdfg']
print(names)
name = input('请输入:')
names.append(name)
names.extend(name)
a = ['assd', 'sddf', 'affsf', 'kjjjk']
names.extend(a)
print(names)