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 

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to