I need to create an item counter that will count how many "+1" were created in a text document that is created if it doesn’t exist, or opens if there is one. The first part of the code I have, that is, the document is created, the "+1" is written. But what to do with the meter, I'll never know. I looked through a large number of sites, I saw different options (count, Сounter, counter (). Most_common and others). And the most frequent option is still the function Counter and count. The problem is that I seem to be missing a module that is responsible for this function, and there are problems with downloading. Therefore, the question: What other function can replace the function Counter?

  • “I seem to have no module that is responsible for this function,” how did you determine this? - andreymal
  • @andreymal on the admonition of one person looked through the modules that exist. In addition, during the operating mode of the program, an error is thrown out, saying that this function was not found. - Vivi Bush
  • those. There are +1 symbols in the text and you just need to count their number? - gil9red
  • one
    @ViviBush really even from collections import Counter doesn't work? - andreymal
  • one
    @ViviBush please show your code that does not work - Ivan Kramarchuk

0