<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Title
Step1:  Tuples
"Though tuples may seem similar to lists, they are often used in different situations and for different purposes. Tuples are immutable, and usually contain an heterogeneous sequence of elements that are accessed via unpacking (or indexing (or even by attribute in the case of namedtuples). Lists are mutable, and their elements are usually homogeneous and are accessed by iterating over the list." - Python Documentation
"Tuples are heterogeneous data structures (i.e., their entries have different meanings), while lists are homogeneous sequences." - StackOverflow
Parentheses are optional, but useful.
Step2:  Dictionaries
"A dictionary is like an address-book where you can find the address or contact details of a person by knowing only his/her name i.e. we associate keys (name) with values (details). Note that the key must be unique just like you cannot find out the correct information if you have two persons with the exact same name." - A Byte Of Python
Step3:  Sets
Sets are unordered collections of simple objects.
<ASSISTANT_TASK:>
Python Code:
# Create a list of countries, then print the results
allies = ['USA','UK','France','New Zealand',
          'Australia','Canada','Poland']; allies
# Print the length of the list
len(allies)
# Add an item to the list, then print the results
allies.append('China'); allies
# Sort list, then print the results
allies.sort(); allies
# Reverse sort list, then print the results
allies.reverse(); allies
# View the first item of the list
allies[0]
# View the last item of the list
allies[-1]
# Delete the item in the list
del allies[0]; allies
# Add a numeric value to a list of strings
allies.append(3442); allies
Explanation: Title: Data Structure Basics
Slug: data_structure_basics
Summary: Data Structure Basics
Date: 2016-05-01 12:00
Category: Python
Tags: Basics
Authors: Chris Albon  
Lists
"A list is a data structure that holds an ordered collection of items i.e. you can store a sequence of items in a list." - A Byte Of Python
Lists are mutable.
End of explanation
# Create a tuple of state names
usa = ('Texas', 'California', 'Maryland'); usa
# Create a tuple of countries
# (notice the USA has a state names in the nested tuple)
countries = ('canada', 'mexico', usa); countries
# View the third item of the top tuple
countries[2]
# View the third item of the third tuple
countries[2][2]
Explanation: Tuples
"Though tuples may seem similar to lists, they are often used in different situations and for different purposes. Tuples are immutable, and usually contain an heterogeneous sequence of elements that are accessed via unpacking (or indexing (or even by attribute in the case of namedtuples). Lists are mutable, and their elements are usually homogeneous and are accessed by iterating over the list." - Python Documentation
"Tuples are heterogeneous data structures (i.e., their entries have different meanings), while lists are homogeneous sequences." - StackOverflow
Parentheses are optional, but useful.
End of explanation
# Create a dictionary with key:value combos
staff = {'Chris' : 'chris@stater.org',
         'Jake' : 'jake@stater.org',
         'Ashley' : 'ashley@stater.org',
         'Shelly' : 'shelly@stater.org'
        }
# Print the value using the key
staff['Chris']
# Delete a dictionary entry based on the key
del staff['Chris']; staff
# Add an item to the dictionary
staff['Guido'] = 'guido@python.org'; staff
Explanation: Dictionaries
"A dictionary is like an address-book where you can find the address or contact details of a person by knowing only his/her name i.e. we associate keys (name) with values (details). Note that the key must be unique just like you cannot find out the correct information if you have two persons with the exact same name." - A Byte Of Python
End of explanation
# Create a set of BRI countries
BRI = set(['brazil', 'russia', 'india'])
# Is India in the set BRI?
'india' in BRI
# Is the US in the set BRI?
'usa' in BRI
# Create a copy of BRI called BRIC
BRIC = BRI.copy()
# Add China to BRIC
BRIC.add('china')
# Is BRIC a super-set of BRI?
BRIC.issuperset(BRI)
# Remove Russia from BRI
BRI.remove('russia')
# What items are the union of BRI and BRIC?
BRI & BRIC
Explanation: Sets
Sets are unordered collections of simple objects.
End of explanation
<END_TASK>