python 3 constant

Noah Hall enalicho at gmail.com
Wed Jun 22 17:17:49 EDT 2011


On Wed, Jun 22, 2011 at 7:54 PM, sidRo <slacky2005 at gmail.com> wrote:
> How to declare a constant in python 3?

There aren't true constants in Python, but instead we use a standard
defined by PEP 8, which states constants are in all caps, for example,
PI = 3.14, as opposed to pi = 3.14 which could change (according to
PEP 8, that is)



More information about the Python-list mailing list