May-18-2018, 03:36 AM
What you are doing is to sacrifice the readability of the code for some desire to be pythonic. Pythonic means just that, the right tool in the right place. As @micseydel mentioned it already.
One reason why Python has this popularity is that it's easy to read. And to write. You are struggling to write one piece of code. It should not be that way. If it's hard for you to write it, it will be hard for someone else to read it.
One reason why Python has this popularity is that it's easy to read. And to write. You are struggling to write one piece of code. It should not be that way. If it's hard for you to write it, it will be hard for someone else to read it.