salut a tous,
j'ai un problème lors de la création d'un fichier HTML avec python
surtout quand je fait passer des variables dans le code :
def informations():
a=input('entrer nom:')
b=input('entrer prénom:')
c=input('entrer date de naissance:')
d=input('entrer sexe:')
if d=='masculin':
texte=['<html>\n'
'<title>informations personnelles</title>\n'
'<head>\n'
'<body>\n'

print'vous etes monsieur :"%s" "%s" ' % (a,b)
'</body>\n'
'</head>\n'
'</html>']
x=open('site.html','w')
for i in texte:
x.write(i)
x.close()

il me donne une erreur de syntaxe ici
qui peut me corriger ce blème