Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- with open(out_file, 'w') as csvfile:
- w = csv.writer(csvfile)
- # sorted() can choose compare key and wether reverse
- w.writerows(sorted(indexs.items(), key=lambda kv: kv[1], reverse=True))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement