codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
x = 1 def one(): "This is perfectly fine." y = x return y def two(): "This too!" x = 2 return x def three(): "Python creates a new local x, and assigns it x+2, but x has no value yet." x = x + 2 return x print one() print two() print three()
Private
[
?
]
Run code
Submit