Good point! Oddly enough, I wrote a whole article about cloning lists which includes slices as an example, so I'm not sure why I chose to use list comprehensions. I think the decision was based on the very last example which uses the copy constructor, but who knows! haha
Thanks again for the tip!
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.