第四,五章

1.創建模塊:在IDLE中新建一個名叫fibo.py文件,編輯如下圖: 按F5,然後可以在shell中導入這個模塊了 如: >>>import fibo >>>fibo.fib(100) 1 1 2 3 5 8 13 21 34 55 89 2.輸入輸出 repr()和str(): >>>s='Hello,world.' >>>str(s) 'Hello,world.' >>>repr(s) "'
相關文章
相關標籤/搜索