- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 44字
- 2021-07-02 14:00:30
Importing modules
Now, after creating a module, we will learn how to import that module. In the previous example, we created a sample module. Now we will import the sample module in add.py script:
add.py
import sample
sum = sample.addition(10, 20)
print(sum)
Output:
30
推薦閱讀
- Spring Boot 2實(shí)戰(zhàn)之旅
- Spring技術(shù)內(nèi)幕:深入解析Spring架構(gòu)與設(shè)計(jì)
- 小創(chuàng)客玩轉(zhuǎn)圖形化編程
- Leap Motion Development Essentials
- Java Web程序設(shè)計(jì)
- Yocto for Raspberry Pi
- Learning SciPy for Numerical and Scientific Computing(Second Edition)
- 用戶體驗(yàn)可視化指南
- Maker基地嘉年華:玩轉(zhuǎn)樂動(dòng)魔盒學(xué)Scratch
- 網(wǎng)絡(luò)數(shù)據(jù)采集技術(shù):Java網(wǎng)絡(luò)爬蟲實(shí)戰(zhàn)
- Learning Nessus for Penetration Testing
- 可視化H5頁面設(shè)計(jì)與制作:Mugeda標(biāo)準(zhǔn)教程
- Microsoft Windows Identity Foundation Cookbook
- Python AI游戲編程入門:基于Pygame和PyTorch
- Java Web開發(fā)任務(wù)教程