Ask coding questions

← Back to all posts
How to use another file in Python ?
PancakeDev (3)

Hi guys !
for a project in Python i need to use many files, but if a function is in the file "", how can i call this function in "" ?

print("Thanks if you give an answer !")

Answered by robowolf (549) [earned 5 cycles]
View Answer
robowolf (549)

At the head of do from english import *. Then call the function.

Harkinian (1)


PancakeDev (3)

@Harkinian Yes but i need to import a library or not ?

Harkinian (1)

No but
execfile() only works at py2 by the way if you using py3 use this