mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-08-11 17:24:29 +02:00
[python3/en] added int div, modulo, and scoping
Added integer or truncation division, the modulo operator which were missing from operators section. Added function scoping in the functions section.
This commit is contained in:
@@ -426,7 +426,7 @@ def setGlobalX(num):
|
||||
global x
|
||||
print (x) # => 5
|
||||
x = num # global var x is now set to 6
|
||||
print (x)
|
||||
print (x) # => 6
|
||||
|
||||
setX(43)
|
||||
setGlobalX(6)
|
||||
|
Reference in New Issue
Block a user