I am unable to replicate your error in Python 3.7.3. The code works.
Try adding at the top:
https://www.python.org/dev/peps/pep-0263/
Try adding at the top:
#!/usr/bin/python # -*- coding: utf-8 -*-More info in this PEP:
https://www.python.org/dev/peps/pep-0263/