You need to quote that filename:
f = open("D\\python\\HW\\2_1 - Copy.cp", "r")
Otherwise the bare backslash after the D is interpreted as a line-continuation character, and should be followed by a newline. This is used to extend long expressions over multiple lines, for readability:
print "This is a long",\
"line of text",\
"that I'm printing."
Also, you shouldn't have semicolons (;
) at the end of your statements in Python.