If you are looking for a good way to occupy a toddler for a while, I highly recommend clothespins. We purchased some to use for connecting blankets when making forts, and when Simon was having a particularly whiny day recently, and was in need of stimulation, I grabbed them and showed him how to hook them onto things. He calmed down right away, and took this new activity very seriously, while having lots of fun.
He was proud of the new ability he was learning, as he switched from just placing them onto the edge of a little wooden crate, to actually pinching them and getting them to grip. He loved figuring out how to make them work. We eventually moved on to hooking them onto all kinds of other things, like picking up little toys with them, and hooking them onto our clothes.
Clothespins are excellent for helping little ones to improve hand strength and fine motor coordination, so there is the added bonus that while they are having a blast, it is aiding in their development too.