A Simple Example on How to import a custom Class in Your Python Code !!

Publié le: 22 janvier 2023
sur la chaîne: Taha AIT
1,450
29

A step-by-step example that explains how to define a class in a seperate file, and use it in your main file;
--------------------------------------------------------------------------------------------------------------------
The first class is used as an instance attribute inside the main class.
Do not forget to import the class that you wanna use as follows:
from file_name(without '.py') import class_name
--------------------------------------------------------------------------------------------------------------------

#python
#objectorientedprogramming

Good Luck !!


Sur cette page du site, vous pouvez voir la vidéo en ligne A Simple Example on How to import a custom Class in Your Python Code !! durée heure minute seconde en bonne qualité , qui a été Téléchargé par l'utilisateur Taha AIT 22 janvier 2023, Partagez le lien avec vos amis et connaissances, sur youtube cette vidéo a déjà été regardée 1,450 fois et il a aimé 29 téléspectateurs. Bon visionnage!