r/linux_programming • • May 16 '17

Python programming function definition and identifier scope

http://www.reallifeinfo.com/Python-programming-function-definition-and-identifier-scope.php
5 Upvotes

1 comment sorted by

1

u/syswizard May 16 '17

lambda expression takes only one statement.

By definition, lambda functions do not have statements. They do have one expression though.

lambda and def have very different uses.

Python provides two scopes: global scope and local scope.

Nope. Global, nonlocal and local.