Commit dccef2a1 by BellCodeEditor

save project

parent 5606505c
Showing with 22 additions and 2 deletions
a=['张芷僮','爸爸','妈妈']
#a.insert(3,'浩浩')
a.append('浩浩')
print(a)
#a.extend('爷爷','奶奶')
b=['爷爷','奶奶']
b.insert(2,'小姨')
a.extend(b)
print(a)
#b.insert(2,'小姨')
#print(b)
#猴子第一天摘下若干个桃子,当即吃了一半,还不过瘾,又多吃了一个。
#第二天早上又将剩下的桃子吃掉一半,又多吃了一个。 以后每天早上都吃了前一天剩下的一半零一个。
#到第10天早上想再吃时,见只剩下一个桃子了。 求第一天共摘了多少个桃子。
a=1
for i in range(9):
a=a*2+1
print(a)
...@@ -4,4 +4,5 @@ ...@@ -4,4 +4,5 @@
#这时还是无名小卒的关羽上前请战,请从b列表中删掉“关羽”,用三种方法哦。 #这时还是无名小卒的关羽上前请战,请从b列表中删掉“关羽”,用三种方法哦。
b=['袁术','夏侯惇','曹操','关羽'] b=['袁术','夏侯惇','曹操','关羽']
b.pop('关羽') b.pop(3)
\ No newline at end of file print(b)
\ 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