append to the end of a dictionary

Magnus Lycka lycka at carmen.se
Wed Jan 25 07:32:25 EST 2006


Paul Rubin wrote:
>     ports = [('5631', 'udp'),
>              ('5632': 'tcp'),
>              ('3389': 'tcp'),
>              ('5900': 'tcp')]

Change the colons to commas, and this will work...



More information about the Python-list mailing list