iteritems() and enumerate()

E

Erik Max Francis

Xah said:
Python has iteritems() and enumerate() to be used in for loops.

can anyone tell me what these are by themselves, if anything?

are they just for idiom?
thanks.

You would be funnier if you weren't so incompetent.
 
F

Fredrik Lundh

Xah said:
Python has iteritems() and enumerate() to be used in for loops.

can anyone tell me what these are by themselves, if anything?

iteritems() is a dictionary method, which returns a lazily constructed
sequence of all (key, value) pairs in the dictionary.

enumerate(seq) is a function that returns a lazily constructed list of
(index, value) pairs for all values in a sequence.

check the relevant sections of the library reference for details.

</F>
 
S

Steve Holden

Xah said:
Python has iteritems() and enumerate() to be used in for loops.

can anyone tell me what these are by themselves, if anything?

are they just for idiom?

No, anyone can use them, not just idioms like you.

regards
Steve
 
A

alex23

Erik said:
You would be funnier if you weren't so incompetent.

No, even if he was more competent, he'd still be a vicious, pointless
asshole:

"By the way, the pussy sex accuse us and hate us virile sex for
undiscrimination and hunger for humping. But look at their ugliness,
hogging with their arms and legs the moment a powerful dick or asshole
walks by. If we males are assholes, they made us so. If male animals
rape female animals, the females has a lot to do with it. **** them,
and **** them for their brainlessness."

http://xahlee.org/Periodic_dosage_dir/t1/20040403_fem_fatale.html

With an observational ability like that, who would *ever* listen to a
word he'd say?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top