Skip to content

Comment on Python: copying a list the right wayparent

Comments

I actually have to agree if you are coming to something like

    a = b[:]
in code you are going to understand what it means or you are probably going to be missing a large portion of other things that are going on in the python code.

With that said I must also state that I think

    a = list(b)
is much prettier and is easier to understand to me.
AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.