How can I import different .py files in python based on user-input?
def main():
FileName = input(">")
file = FileName.replace(".py", "")
import file
print(test) #from the file imported
main()
Something like this, so I can import a certain file created with the name of the user input, and that file imported contains a string or a list and so I could print that string or list within the main python file.