Python Forum

Full Version: create a function that can count
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hello guys im a french student and I have a question:

How could i create a function that can count how mani times i used it please ? I don't have any restrictions I can use every part of python to do it.

thank you Smile
Indeed you have to store the count somewhere. It cannot be in the function, because the count would be gone as soon as the function ends. Try to make a list of possibilities to store the count.