either_24¶
Given a list of ints, return true if the list contains a 2 next to a 2 or a 4 next to a 4, but not both.
This exercise was taken from codingbat.com and has been adapted for the Python language. There are many great programming exercises there, but the majority are created for Java.