Python ASCII encoding errors

I was writing a simple script in Python and for some reason I was getting encoding errors, later found out that when I copy paste from Notepad++, the encoding settings got changed. After adding the below line fixed the problem:

# -*- coding: utf-8 -*-

This will also help if you are using UTF-8 encoding in your code.