Commit b2d8e6ca by BellCodeEditor

save project

parent ae7f170b
Showing with 12 additions and 3 deletions
fruit=["香蕉","苹果","梨"] fruit=["苹果","香蕉","梨"]
print(fruit[1]) print(fruit[1])
fruit[2]='橙子' fruit[2]='橙子'
\ No newline at end of file fruit.pop(1)
#fruit.pop(-2)
fruit.remove('苹果')
print(fruit)
fruit.append('桃子')
fruit.insert(0,'山竹')
print(fruit)
fruit2=['榴莲','芒果','柠檬','火龙果']
fruit.extend(fruit2)
print(fruit2)
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