How to iterate throuhg dictionary

Alexandre Fayolle alf at pisces.logilab.fr
Wed Aug 8 12:07:17 CEST 2001


On Wed, 08 Aug 2001 11:54:10 +0200, Piotr Legiecki 
<piotrlg at sci.pam.szczecin.pl> wrote:
>I'v created dictionary named d={}. Its structure is like this: 
>I'd like to print all values stored in  'd'. What is the easiest way to do
>it?


for v in d.values():
	print v


Alexandre Fayolle
-- 
LOGILAB, Paris (France).
http://www.logilab.com   http://www.logilab.fr  http://www.logilab.org
Narval, the first software agent available as free software (GPL).



More information about the Python-list mailing list