Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

2
  • 4
    Note that printing isn't a problem in Python 3, since print is changed to a function. Commented Jan 10, 2014 at 3:19
  • If funcM() in the example were more complicated, including statements not allowed in a lambda, would there be any way to pass a function in Python without declaring it separately? JavaScript and Dart allow you to just pass an anonymous function as an argument, for example. Thanks. Commented Aug 24, 2023 at 20:41