Advertisement
Felanpro

anonymous functions

Jul 16th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. #Anonymous functions are basically one line mini functions. The purpose of them is to have fun. lol :]
  2.  
  3. anon_func = lambda x: x + 2 #Acknowledge the lambda keyword; Used for creating anonymous fucntions.
  4.  
  5. print(anon_func(13)) #Puts additional information to parameter.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement