Darwin hypothesized that flower constancy in insects that feed on nectar results from the need to learn how to extract nectar from a flower of a given species. In laboratory tests, Pieris rapae, the cabbage butterfly, showed flower constancy by continuing to visit flower species with which it had experience. The time required by individuals to find the source of nectar in flowers decreased with successive attempts, the performance following a learning curve. Learning to extract nectar from a second species interfered with the ability to extract nectar from the first. Insects that switch species thus experience a cost in time to learn. These results support recent suggestions on the importance of learning in animals foraging.