利用w3schools練習的python指令

animal = ["豬", "牛", "羊", '貓', "猴", "狗"]
#python語言的註解comments
for i in range(5):#其他語言{}代表一個區
x = '我的' + animal[i]
print(x) #使用index
x = animal.copy()
print(animal[3])
x.reverse() #將x反轉reverse
print(x)
animal.append('狗')
print(animal)
y = animal.copy()
y.reverse() #將x反轉reverse
print(y)

519

GOOGLE COLAB執行程式

JUPYTER NOTE人工智慧平台

留言

  1. 423.https://wihfaw.blogspot.com/2025/04/java-script-button-onclickexe.html
    409.https://wihfaw.blogspot.com/2025/04/var-banks-function-abc-var-c-document.html
    326.截圖要「原始大小」才能清楚呈現https://wihfaw.blogspot.com/2025/03/preborder5px-dashed-pinkh1backgroundlig.html
    https://wihfaw.blogspot.com/2025/03/animal-pythoncomments-printanimal2.html

    回覆刪除

張貼留言

這個網誌中的熱門文章