Skip to content

Commit 361bc51

Browse files
authored
Added default parameters
1 parent 1e1782c commit 361bc51

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Default parameters and keyword arguments
2+
# positional arguments
3+
# keyword arguments
4+
# default parameters
5+
def audi(model='audi-8', color ='pure black', price='2.4 cr'):
6+
print(f'hello model {model} price {price} color {color}')
7+
8+
9+
# positional arguments
10+
audi(19121, 'x', 'white')
11+
# keyword arguments
12+
audi(model='x', color='white', price=12132)
13+
14+
# default parameters
15+
audi()

0 commit comments

Comments
 (0)