In the code:
inF = open(input("Enter Filename: "),'r') import inF inF
Is there any way I can import the filename that the user inputs?
@ANDREWVOSS so like
__import__("other") other.func()
will work just fine (given you defined func)
func
How can I open a file based on user input?
In the code:
Is there any way I can import the filename that the user inputs?
@ANDREWVOSS so like
will work just fine (given you defined
func
)