Make and import python class | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Make and import python class

I know tht we can make a custom module with python then reuse it in the other file, but class? Can we do the same as we do with modules? I mean importing it?

10th Feb 2018, 2:50 PM
Fajar Kurniawan
2 Answers
+ 4
yes can be done https://code.sololearn.com/cug88hwsco01/?ref=app https://code.sololearn.com/cYMW9YKvRwD1/?ref=app place both the code in same folder for this to work
10th Feb 2018, 10:01 PM
Waseem
Waseem - avatar
+ 3
thanks
12th Feb 2018, 10:45 AM
Fajar Kurniawan