AOL: 10 Vintage Nicknames for Boys That Never Go Out of Style
MSN: 20 Cool Instagram Bio Ideas for Boys and Girls in 2025
Spotify is the best way to listen to music on mobile or tablet. Search for any track, artist or album and listen for free. Make and share playlists. Build your biggest, best ever music collection. Get inspired with personal recommendations.
Spotify gives you access to a world of free music, curated playlists, artists, and podcasts you love. Discover podcasts, new music, top songs or listen to your favorite artists and albums.
Spotify is the best way to listen to music and podcasts on your mobile or tablet. Find music you love - simply search for any track, artist or album and then listen for free.
Spotify Premium is a digital music service that gives you access to ad-free music listening of millions of songs. Try 2 months for $0.
By using a : colon in the list index, you are asking for a slice, which is always another list. In Python you can assign values to both an individual item in a list, and to a slice of the list.
What is the difference between list [1] and list [1:] in Python?
The second, list(), is using the actual list type constructor to create a new list which has contents equal to the first list. (I didn't use it in the first example because you were overwriting that name in your code - which is a good example of why you don't want to do that!)
When reading, list is a reference to the original list, and list[:] shallow-copies the list. When assigning, list (re)binds the name and list[:] slice-assigns, replacing what was previously in the list. Also, don't use list as a name since it shadows the built-in.