Skip to content · ⁨본문 바로가기⁩

Count a value

English

Count a value

Count how often one value appears in a list.

Loop over the list and compare each item with target. It is the counter pattern again, with the condition item == target, and it works for words as well as numbers.

한국어

특정 값 세기

리스트에서 한 값이 얼마나 자주 나타나는지 세십시오.

리스트를 순회하며 각 항목을 target과 비교하십시오. 이는 조건 item == target이 있는 카운터 패턴이며, 숫자뿐만 아니라 문자열에도 적용됩니다.

Log in or create account · ⁨로그인 또는 계정 만들기⁩

IGCSE, A-Level & AP