Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

6
  • Yes, (k[0] != v[0]) ==> num & (k[-1] != v[-1]) ==> tex...You can test by printing k[0], v[0] and k[-1], v[-1] Commented Sep 24, 2018 at 10:31
  • open("out.csv", "wb") as out_file: ? Commented Sep 24, 2018 at 10:33
  • i used your code of 'open("out.csv", "wb") as out_file: and got the following error out_file_writer.writerow(next(file_1)) #Writer Header peError: a bytes-like object is required, not 'str' Commented Sep 24, 2018 at 10:36
  • python3 use --> open("out.csv", "w", newline='') as out_file: Commented Sep 24, 2018 at 10:40
  • Looks like some of the columns are empty...check for emptiness first ... Commented Sep 24, 2018 at 11:02