from email import message
def main(): # Creates a main function to initiate the program
global name, info
name = input("Enter your name: ") # Makes inputs that requires an user to enter info
info = input("Describe yourself: ")
main() # The program starts here
f = open('test3.html','w')
message = """<html>
<head>
</head>
<body>
<center>
<h1>{name}</h1>
</center>
<hr />
{info}
<hr />
</body>
</html>"""
f.write(message)
f.close()
Hello, I am creating a py file that accepts the user's inputs (which are {name} and {info} in my code) and creates a .html file. I tried to use + name + or + info + but both not worked. Are there any other ways that I can use to make it work correctly? Thank you so much for reading my question