Skip to content
RapidFinger — free online typing test

Typing tests

← All programming languages

Python Coding Practice

Practice typing real code syntax, including brackets, punctuation, and indentation. Snippets are for typing practice only and are never executed.

Count items with a dictionary

Type the code exactly. Tab inserts four spaces. Code is not executed.

Choose another snippet

Progress: 0%

Current mismatches: 0

words = ["code", "learn", "code", "practice"]
counts = {}

for word in words:
    counts[word] = counts.get(word, 0) + 1

for word, count in counts.items():
    print(f"{word}: {count}")

Type the code exactly, including spaces and indentation.