Variable declaration reset: Difference between revisions
Content added Content deleted
(J: fix bad markup) |
m (Python example) |
||
Line 361: | Line 361: | ||
=={{header|Python}}== |
=={{header|Python}}== |
||
In Python, variables are supposed to be defined before they are used |
In Python, variables are supposed to be defined before they are used. The code does run, but note that a Python code checker such as pyflakes will flag such code with an error. |
||
<lang python> |
<lang python> |
||
s = [1, 2, 2, 3, 4, 4, 5] |
s = [1, 2, 2, 3, 4, 4, 5] |