Python Forum
Quick Lists Question (Count Occurences)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Quick Lists Question (Count Occurences)
#4
the easiest way to check occurrence if you cant use collections is to use a dictionary. The key as the identifyer (such as your 9 ints), and the value is the number of occurrences. Every time the dict key is inputed (one of your 9 ints), that key's value gets incremented.
Recommended Tutorials:
Reply


Messages In This Thread
Quick Lists Question (Count Occurences) - by EwH006 - Nov-16-2016, 12:06 AM
RE: Quick Lists Question (Count Occurences) - by metulburr - Nov-16-2016, 12:33 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Count occurences in a string and add to a list using loops Leyo 4 1,777 Mar-11-2022, 03:52 PM
Last Post: Leyo
  Calculator I need quick help Malin3k 3 2,153 Feb-13-2021, 02:10 AM
Last Post: BashBedlam
  Count Letters in a Sentence (without using the Count Function) bhill 3 5,328 Jun-19-2018, 02:52 AM
Last Post: bhill
  regex, counting occurences yanhto 4 3,464 May-06-2018, 10:20 PM
Last Post: killerrex

Forum Jump:

User Panel Messages

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