• funkless_eck@sh.itjust.works
    link
    fedilink
    arrow-up
    3
    ·
    3 months ago

    as a complete layman and hobbyist i also personally think that “more pythonic” coding can sometimes be more confusing.

    I dont think any beginner reads “j for j for i in k” and instantly gets it.

    maybe unpopular opinion idk

    • calcopiritus@lemmy.world
      link
      fedilink
      arrow-up
      3
      ·
      edit-2
      3 months ago

      Anything that’s not an integer or a range doesn’t belong inside []. Much more readable to use zip, map, filter, etc. And more powerful.

      EDIT: that was meant for indexing lists. Strings inside [] for indexing ducts are fine.