tuples, index method, Python's design

Delaney, Timothy (Tim) tdelaney at avaya.com
Tue Apr 10 19:36:17 EDT 2007


Carsten Haese wrote:

> assert current_player in p
> opponents = tuple(x for x in p if x is not current_player)

That would perform better as:

    opponents = tuple(x for x in p if x is not current_player)
    assert opponents

Tim Delaney



More information about the Python-list mailing list