Create edges from cells
Honestly? It looks pretty straightforward. Everything in your code screams you've done this before. Good!

You're adhering to the standards of Python (the PEPs). The imports are at the exactly right places. The code is readable, easy to understand and does things the easiest way possible. In other words: it's Pythonic.

You could consider wrapping your print statements in main into a template so you'll only need one print call. However, since you only print once, I'm not sure how useful this would be in the end.

While your code is easy to understand, you might want to make the naming even better. You got 5 variables with the term edges in it, not even counting main where you use some of the exact names again. You're also overwriting cells_edges after the for after using it as a temporary variable. That's probably not the most maintainable way.

Single-character variable names should be avoided, even if they appear to be obvious.

d[f].append(k)


Yea, not a good idea. c, d, f and k should be renamed.