If you need to brush up on binary (base 2) numbers to get started, read Number Bases: Introduction & Binary Numbers.
Scan. Read later. We will do lists first
I suggest you read Shallow and Deep Copy to get a better understanding of how copying works. In particular, whenever you are working with a collection of mutable collections, you will need to import the copy module and use the deepcopy method.
In connection with this, we will be using the ==
and the is()
comparison operators
and the built-in function
id()
to examine copies.
Read Python 101: Equality vs Identity
for a discussion of these.
To swap two elements in a list, I suggest you read Approach #1 in swap
Scan. Read later. We will do lists first
Scan. Read later. We will do lists first
skip; we will have our own exercises and assignments.