- 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
推薦閱讀
- OpenDaylight Cookbook
- 數據庫原理及應用(Access版)第3版
- Python網絡爬蟲從入門到實踐(第2版)
- STM32F0實戰:基于HAL庫開發
- Visual Basic程序設計實驗指導(第4版)
- iOS應用逆向工程(第2版)
- AIRIOT物聯網平臺開發框架應用與實戰
- D3.js By Example
- C專家編程
- HTML5權威指南
- Delphi開發典型模塊大全(修訂版)
- Elastix Unified Communications Server Cookbook
- 透視C#核心技術:系統架構及移動端開發
- Leaflet.js Essentials
- LibGDX Game Development By Example