DEV Community

Discussion on: 18 Python one-liners that will speed up your coding process.

Collapse
 
elvi2 profile image
ElVi2

As someone who used these in the past during her studies, I personally would say that while they make the code more compact, depending on the situation they may also potentially compromise debugging and overall readability, especially if one uses a lot of them (I got a lot of complaints from teachers about my code being hard to follow when I was using a lot of one-line loops and had to rewrite them on spot). So I think at least a few of these are pretty situational IMO.