郭芯薰PYTHON陣列ARRAY串列LIST字典DIC集合SET元組TUPLE

利用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人工智慧平台

心得

UL=UNDERER LIST, OL=ORDERED LIST, LI=LIST
大括號{ }CURLY BRACKET, CURLY捲
中括號[ ]SQUARE BRACKET, SQUARE方形
小括號( )CIRCLE BRACKER, CIRCLE圓
圓周CIRCUMFERENCE
直徑DIAMETER
半徑RADIUS
BORDER邊界, SOLID實心, PX=PIXEL點,

留言

  1. https://guovupvmp.blogspot.com/2025/03/animal-pythoncomments-x-animal.html
    第一次上課https://guovupvmp.blogspot.com/2025/02/canvas-body-font-family-arial-sans.html

    回覆刪除

張貼留言

這個網誌中的熱門文章

郭芯薰Javascript網頁BUTTON按鈕ONCLICK事件call呼叫函數

郭芯薰二分法求內部報酬率

Python_Javascript網路執行_EXCEL_IRR二分法