From 88dceb260a3adb69873303e4bacd0ea7da8f0a95 Mon Sep 17 00:00:00 2001 From: Isabelle Viktoria Maciohsek Date: Sun, 11 Oct 2020 10:29:24 +0300 Subject: [PATCH] Update count_occurences.md --- snippets/count_occurences.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/snippets/count_occurences.md b/snippets/count_occurences.md index b68696d52..f6f8c8269 100644 --- a/snippets/count_occurences.md +++ b/snippets/count_occurences.md @@ -5,7 +5,7 @@ tags: list,beginner Counts the occurrences of a value in a list. -- Use the `count` method of Python's list object to count the number of occurrences. +- Use `list.count()` to count the number of occurrences of `val` in `lst`. ```py def count_occurrences(lst, val):