r/learnpython • • 1d 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

1 Upvotes

16 comments sorted by

View all comments

6

u/mrswats 1d ago

What have you tried? What's not working? Show us some code so we can help you with it.

But also, you could check the documentation and see if you can figure it out yourself.