Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- countries = ["UK","Ireland","France","Belgium","Netherlands","Luxembourg","Germany","Denmark"]
- countries[:]
- Out[2]:
- ['UK',
- 'Ireland',
- 'France',
- 'Belgium',
- 'Netherlands',
- 'Luxembourg',
- 'Germany',
- 'Denmark']
- countries.append("Slovakia")
- countries
- Out[4]:
- ['UK',
- 'Ireland',
- 'France',
- 'Belgium',
- 'Netherlands',
- 'Luxembourg',
- 'Germany',
- 'Denmark',
- 'Slovakia']
- countries.remove("UK")
- countries
- Out[6]:
- ['Ireland',
- 'France',
- 'Belgium',
- 'Netherlands',
- 'Luxembourg',
- 'Germany',
- 'Denmark',
- 'Slovakia']
- countries.insert(-2, "Czech Republic")
- countries
- Out[8]:
- ['Ireland',
- 'France',
- 'Belgium',
- 'Netherlands',
- 'Luxembourg',
- 'Germany',
- 'Czech Republic',
- 'Denmark',
- 'Slovakia']
Advertisement
Add Comment
Please, Sign In to add comment