"**" in python

Skip Montanaro skip.montanaro at gmail.com
Sun Nov 23 20:48:50 EST 2014


I want to add one more thing to the other responses. People new to Python
often seem unaware that being an interpreted language, often the best way
to figure something out is to simply try it at the interpreter prompt. The
OP saw "var ** 2" in done code. The most obvious thing to me would have
been to type

var = 42
var ** 2

and see what happened. It's unlikely to trigger a nuclear meltdown, or even
crash the interpreter.

Skip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20141123/30458a81/attachment.html>


More information about the Python-list mailing list