Last active
September 12, 2024 15:27
-
-
Save lili668668/d4210a98cc48c1c336667b42f37284ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mouse = "鼠" | |
cow = "牛" | |
tiger = "虎" | |
rabbit = "兔" | |
dragon = "龍" | |
snake = "蛇" | |
horse = "馬" | |
sheep = "羊" | |
monkey = "猴" | |
chicken = "雞" | |
dog = "狗" | |
pig = "豬" | |
i = 4202 | |
while i <= 5202: | |
print(str(i) + " " + dog) | |
print(str(i + 1) + " " + pig) | |
print(str(i + 2) + " " + mouse) | |
print(str(i + 3) + " " + cow) | |
print(str(i + 4) + " " + tiger) | |
print(str(i + 5) + " " + rabbit) | |
print(str(i + 6) + " " + dragon) | |
print(str(i + 7) + " " + snake) | |
print(str(i + 8) + " " + horse) | |
print(str(i + 9) + " " + sheep) | |
print(str(i + 10) + " " + monkey) | |
print(str(i + 11) + " " + chicken) | |
i = i + 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
animals = ["狗","豬","鼠","牛","虎","兔","龍","蛇","馬","羊","猴","雞"] | |
i = 4202 | |
while i <= 5202: | |
offset = 0 | |
for animal in animals: | |
print(str(i + offset) + " " + animal) | |
offset = offset + 1 | |
i = i + 12 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apple = "蘋果" | |
d = {"key": "value","球魚": "是球", "value 可以是數字": 1, 1: "key 也可以是數字", | |
"覺得字太多": "可以換行", | |
"當然宣告時 value 可以用變數置換": apple, apple: "反過來也可以"} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t = ("tuple 他", "長的有點像 list", "item 可以有好幾個", "也可以混數字", 1, "簡直不能再像", "但他不是 list", "最重要的是他是 item 是唯讀的") | |
l = ["拿個 list 做對照"] | |
print(l[0]) | |
l[0] = "我被修改了" | |
print(l[0]) | |
print('---') | |
print(t[0]) | |
t[0] = "我被修改了" | |
print(t[0]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment