Jump to content

Variable declaration reset: Difference between revisions

m
Python example
(J: fix bad markup)
m (Python example)
Line 361:
 
=={{header|Python}}==
In Python, variables are supposed to be defined before they are used,. butThe thecode undefineddoes variable `prev` is still not equal to `curr` belowrun, sobut the code runs nevertheless. Notenote that a Python code checker such as pyflakes will flag such code with an error.
<lang python>
s = [1, 2, 2, 3, 4, 4, 5]
4,104

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.