datetime
date
time
timedate
What will be the output?
def fun(a,b=2,c=3): print(a,b,c) fun(1,c=10)
1 2 10
1 10 3
1 3 10
Error
def fun(a,b=5,c=10): print(a+b+c) fun(2,c=20)
27
17
22
def fun(a, b=5): print(a+b) fun(10, 20)
15
30
25
0
False
None
Recursive Function
Lambda Function
Built-in Function
Generator Function
lambda x => x+1
lambda(x): x+1
lambda x: x+1
def lambda(x): x+1
Can contain multiple statements
Can have only one expression
Must use return statement
Cannot take arguments
Calling one function from another function
Calling a function repeatedly from itself
Using nested loops
Using lambda functions
Required Argument
Keyword Argument
Default Argument
Decimal Argument
Positional
Keyword
Default
Variable
#
&
*
**
List
Tuple
Dictionary
Set
Increases code duplication
Reduces code reusability
Promotes code reusability and modularity
Makes program slower
Anonymous Function
x = 10 def fun(): global x x = 20 fun() print(x)
10
20
Local Variable
Static Variable
Global Variable
Instance Variable
Global Scope
Built-in Scope
Local Scope
Module Scope