Importing | Sololearn: Learn to code for FREE!

+1

Importing

Is it possible to import the function of another code you have written into a separate code? I’m using Python.

4/20/2018 4:35:01 AM

Nathan Lewis

4 Answers

New Answer

+3

it doesnt work on sololearn only on actual python.

+1

Just use “from NameOfCode import NameOfFunctionOrClass” above the rest of the code It can be imported like any normal library

0

This doesn’t seem to work in SoloLearn, am I missing something?

0

Okay, that’s what I thought! Thanks!!