Python 關鍵字
引用日歷模塊 c:
import calendar as c print(c.month_name[1])
運行實例
as 關鍵字用于創建別名。
在上例中,當導入日歷模塊時,我們創建了一個別名 c,現在我們可以使用 c 代替 calendar 來引用日歷模塊。
import 關鍵字
from 關鍵字
請在我們的 Python 模塊教程 中學習更多關于模塊的知識。