Interactive technologies have become a common play medium for young children; it is not unusual for toddlers to play games on a touchscreen device in lieu of games in the yard. Here, we compared the immediate effects of physical and touchscreen play on 2.5-year-olds' cognitive flexibility, a key aspect of executive function. For nine minutes, toddlers engaged in touchscreen play or physical play; a third group drew and colored (control group). Next, a sorting task measured cognitive flexibility. The physical-play group outperformed the other two groups. Compared to the control group, toddlers' cognitive flexibility benefited from physical play, whereas touchscreen play yielded no significant effect. Interestingly, toddlers who played the touchscreen game in a socially interactive way outperformed those who treated gaming as solitary play. Together, the results bear practical implications on whether and how to introduce young children to interactive technologies for play.