[Tutor] how to use
Alan Gauld
alan.gauld at freenet.co.uk
Sun Aug 6 17:31:41 CEST 2006
Hi Anil,
Are you reading a tutorial?
Most of the questions you are asking should be covered
in any standard tutorial.
> what does
>
> x**x) do?
Its equivalent to
pow(x,x)
ie raises x to the power x.
> 2nd) what is the key for the dictionary, i assume x is the value of
> the dictionary
> dict((x, x**x) for x in range(10))
x is the key and x**x is the value.
HTH,
Alan Gauld
Author of the Learn to Program web site
http://www.freenetpages.co.uk/hp/alan.gauld
More information about the Tutor
mailing list