Every time I try to run this program I got from this tutorial: https://www.youtube.com/watch?v=rioXu6EBN0s (minute 16), I get this error:
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 0-1: truncated \UXXXXXXXX escape.
This is the code that I wrote:
my_variable = "<html><head><title>My HTML File</title></head><body><h1>Hello world!</h1></body></html>"
my_html_file = open("\Users\hp\Desktop\Code\Python testing\CH\my_html_file.html", "w")
my_html_file.write(my_variable)
Does anyone know why I'm getting the error and how I can fix it?
Thanks in advance!