3 ms·
What is odd about Python scoping rules?
by quasarj 4y ago
What is odd about Python scoping rules?
- xigoi 4y agoVariables are function-scoped, not block-scoped. So you can do this: if 2 < 3: s = "Math works" else: s = "Math doesn't work" print(s)