Commit ebd048f2 by BellCodeEditor

auto save

parent 26b3b1d4
Showing with 15 additions and 2 deletions
fruit=['苹果','香蕉','梨']
print(fruit[1])
fruit[2]='橙子'
fruit.pop(1)
#fruit.pop(-2)
fruit.remove('苹果')
print(fruit)
fruit.append('桃子')
fruit.insert(0,'山竹')
print(fruit)
fruit2=['榴莲','芒果','柠檬','火龙果']
fruit.extend(fruit2)
print(fruit[-2:])
......@@ -10,4 +10,5 @@ bro2=["刘备",161,9.1]
bro3=["张飞",166,8.3]
bros[0]="关羽"
bros[1]="刘备"
print(bros)
\ No newline at end of file
print(bros)
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