Mọi người cho mình hỏi,mình có 1 cái function như ở dưới nhưng nó không chạy được.Cho hỏi cần sửa thế nào.
def pretty_printing(dict):
infile = open(file,"r")
outfile = open("example.txt","w")
order_keys = dict.keys()
order_keys.sort()
for key in order_keys:
print key, dict[key]
outfile.close()
infile.close()
#test
a_file=raw_input("enter your file:")
pretty_printing(a_file)