Python Forum
create a function that can count
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
create a function that can count
#1
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
Reply
#2
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.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  create a function format_date ? Kessie1971 7 1,799 Apr-24-2023, 11:54 AM
Last Post: Larz60+
  How to create a menu and execute a function based on user selection in python? Thedarkphoenix 1 1,327 Nov-23-2022, 07:53 PM
Last Post: Larz60+
  Syllable Count Function pav1983 3 2,636 Jun-04-2020, 07:32 AM
Last Post: pyzyx3qwerty
  Count Letters in a Sentence (without using the Count Function) bhill 3 5,201 Jun-19-2018, 02:52 AM
Last Post: bhill
  create function let_to_num() Truman 1 6,030 Feb-15-2018, 04:04 AM
Last Post: ka06059

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020