Simple Python into HTML

The following Python code will find instances of {body} in a file template.html and replace it with a string. Then a new file index.html is created with this change.

generate.py

with open('template.html','r') as template_file:
    template = template_file.read()

content = template
tokens = {'body': 'Body stuff can go here'}
replaced = 'Body stuff can go here.'
content = content.replace('{' + 'body' + '}', replaced)

with open('index.html', 'w') as content_file:
     content_file.write(content)

index.html

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
    <div><p>{body}</p></div>
</html>