How to prevent the execution of a class without placing it behind the main function, i need the class for execution of program. I want to use the class only after it is declared.
Code sample:
class Hello:
print('this message should not have been displayed')
def main():
print('hello world')
main()
Output:
this message should not have been displayed
hello world