Skip to content

Commit

Permalink
Add deleting from dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
bennuttall committed Nov 9, 2013
1 parent b899a2d commit c7d9411
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions intro.py
Expand Up @@ -351,6 +351,23 @@

# GO!

# Delete Daniel from the dictinary

# print('Daniel' in addresses) # [True]
# del addresses['Daniel']
# print('Daniel' in addresses) # [False]

# GO!

# You can also loop over a dictionary and access its contents:

'''
for name in addresses:
print(name, addresses[name])
'''

# GO!

# 23. What is the sum of all the digits in all the numbers from 1 to 1000?

# GO!
Expand Down

0 comments on commit c7d9411

Please sign in to comment.