黃晨陽
利用w3schools練習的python指令
animal = ["豬", "牛", "羊", '貓', "蛇"]
#python語言的註解comments,以下命令出現
print(animal[2])
print(animal[-5])
for i in range(5):#其他語言{}代表一個區
x = '我愛' + animal[i]
print(x) #使用index
print('上面使用index, 下面沒用')
for i in animal:
print(i)
x = animal.copy()
print(animal)
x.reverse() #將x反轉reverse
print(x)
animal.append('狗')
print(animal)
y = animal.copy()
y.reverse() #將x反轉reverse
print(y)
3月4日https://huangchenyang.blogspot.com/2025/03/blog-post.html
回覆刪除3月4日https://huangchenyang.blogspot.com/2025/03/blog-post.html
回覆刪除將它做完整。https://huangchenyang.blogspot.com/2025/02/blog-post.html