Module in Python

Man erstellt eine Datei test.py

def add(a,b):
    return a+b

Anschließend erstellt man die Datei app.py

import test
print('hello')
print(test.add(5,2))

Modules @ docs.python.org

Nach oben scrollen