Skip to content

Instantly share code, notes, and snippets.

@koreus7
Created August 13, 2015 15:16
Show Gist options
  • Save koreus7/4d27dbe24641119dd3ab to your computer and use it in GitHub Desktop.
Save koreus7/4d27dbe24641119dd3ab to your computer and use it in GitHub Desktop.
f = open("schools.csv", 'r')
l = f.readline();
while l:
l = l[1:-2]
x = repr(l).replace("'","\\\'")[1:-4] + "\'" + ","
if x[0] != "'":
x = "'" + x[1:len(x)]
x = x.replace("\\\\", "\\").replace("\'","\"")
print x
l = f.readline()
f.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment