r/learnpython • u/Emergency-Egg-0230 • 10h ago
Function without argument
Ive got a function that takes a dictionary as an argument.
Now Id like to program it so when the function is called without any argument, instead of an error message it prints something custom (a dictionary for example).
Any help is appreciated :D
3
Upvotes
-6
u/ninhaomah 10h ago
Use normal language.
Example : I want McDonald's breakfast. If I didn't specify the drink , would it DEFAULT to hot coffee ?