# create_hello_file.py code = """ class HelloWorld: def hello(self): print("Hello, world!") """ with open("hello_world.py", "w") as f: f.write(code) print("hello_world.py created!")