Python - Modules and Code Organization
You have two Python files:
What will be the output when you run
# file1.py
def greet():
print('Hi from file1')
if __name__ == '__main__':
greet()
# file2.py
import file1
print('In file2')What will be the output when you run
file2.py?