TypeError: 'tuple' object does not support item assignment
```
---
# Sets
- A set is an unordered “bag” of unique values.
- A single set can contain values of any immutable datatype (can contain strings & tuples, but not lists).
- Once you have two sets, you can do standard set operations like union, intersection, and set difference.
---
# Dictionaries
- A dictionary is an unordered set of key-value pairs.
- Keys must be immutable.
- Values can be anything.
---
class: split-50
# Truth Value Testing
.column[
- Any object can be tested for truth value, for use in a condition.
- The following values are considered False
- None
- False
- 0, 0.0, 0j
- Any empty sequence, set, range or dictionary:
- '', "", {}, [], (), range(), etc.
- The rest is True.
]
.column[
.center[![List Comprehension](truth_value.png)]
]
---
# References
- Dr. Hamid Zarrabi-Zadeh's Web Course, Fall 2013.
- http://www.diveintopython3.net/
- http://openbookproject.net/thinkcs/python/english3e/
- http://en.wikipedia.org/wiki/Python_(programming_language)
---
class: center, middle
.center[![Python](python.png)]
# Thank you.
Any questions?