2024 iThome 鐵人賽
Share More Gain More
Python
選手 80 文章 1490
Day 9
2024-09-19
325
0
列表推導式:列表推導式是一種簡潔的語法,用來生成新列表:numbers = [x for x in range(5)]print(numbers) # [0,...
Day 21
2024-10-05
324
0
今天開始慢慢做一個小遊戲,打算做簡易版打磚塊。 import pygame import random # 初始化 pygame pygame.init()...
Day 17
2024-10-01
323
0
裝飾器 (Decorators) 與閉包 (Closures) 是 Python 中蠻重要的概念,特別是在提升程式碼可讀性與模組化方面有極大幫助。 1.裝飾器的...
Day 6
2024-10-02
323
0
今天要介紹 pytest 最重要的功能 fixture。在介紹 fixture 之前要先講到 setup 與 teardown。 setup / teardow...
Day 29
2024-10-13
323
0
學習文章:https://pala.tw/python-web-crawler/在學習如何使用 Python 進行網頁爬蟲的過程中,我受益匪淺。這篇文章不僅介紹...
2024-10-31
322
0
輸入一個中序運算式,運算元為整數,運算子包含加減乘除和括號,將該運算式轉成後序運算式。 def infix_to_postfix(expression):...