Part 9 | Python Programming | Creating, Importing, and Calling from Your own Module (updated)

preview_player
Показать описание
This is part 9 of a series of python coding I am having fun with and want to show others interested or stuck.

Code Example:
#Creating a custom module that you import later
#this helps to save time if use functions, lists, and other information often

#Create a function
def greeting(name):
print("Hello, " + name)

#You can also use lists
person1 = {
"name": "John",
"age": 36,
"country": "Norway"
}

#now save your file as whatever name you want to create your module

Code Example used in the Python Shell:

#import the module that you created
import mymodule as mmd

#Call on a function from within your imported Module

#Call on a list from within your Module that pulls specific information

#You can add as much stuff as you want to your module
#Have fun!!

#python #pythonprogramming #pythontutorial #pythonforbeginners #shorts

Music: Paid Subscription with Wondershare Filmora
Рекомендации по теме
visit shbcf.ru