Memory game implemented in python