fout = open("c:\\pat.txt", "wb")
Reason — The syntax to open a file for writing in binary format is f = open("c:\\temp\\data.txt", "wb"). Hence according to this syntax fout = open("c:\\pat.txt", "wb") format is correct.
fout = open("c:\\pat.txt", "wb")
Reason — The syntax to open a file for writing in binary format is f = open("c:\\temp\\data.txt", "wb"). Hence according to this syntax fout = open("c:\\pat.txt", "wb") format is correct.