If you want to find out how big your dictionary is,
you can use the built in function len for length.
So if I call len on TF_motif, that tells me there are six entries.
Those are six key value pairs.
So six pairs of entries.
We can also find out what the keys are.
That's often something you want to do.
So give me all the words in my dictionary of English, for example.
So we want to get all the words or keys in my dictionary.
I use the keys method, which is attached to it.
And I can do that by typing TF_motif.keys, as we do with methods.
And return that as a list by wrapping that inside of a call to the list command.
So if I say, list of TF_motif.keys,
that returns all the keys in my transcription factor motif dictionary.
And you can see them here, ATF, c-Myc, SP1 and so on.
Returns those as a list.
And similarly, I can get a list of all the values
by using the values method instead of the keys method.
So I would type TF_motif.values, do the same thing, and
I get a list of all the values.
Now, these values come out in an arbitrary order.
You might want to have them sorted, say, alphabetically.
So you can use the sorted function to do that.
So if I simply call sorted on TF_motif.keys,
that'll return all my keys in sorted order.