Python Code Typing Test

Live CPM0
Accuracy100%
Time01:00
Start typingPython / 60s
Type the displayed code. Pasting and drag-and-drop are disabled.Ready for Python, 60 seconds. Start typing when you are ready.
import asyncio import aiohttp from typing import Dict, List, Optional class AsyncWebScraper: def __init__(self, base_url, concurrency_limit=5): self.base_url = base_url self.semaphore = asyncio.Semaphore(concurrency_limit) self.headers = {"User-Agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64)"} async def fetch_page(self, session, endpoint): url = f"{self.base_url}/{endpoint.lstrip('/')}" async with self.semaphore: try: async with session.get(url, headers=self.headers, timeout=10) as response: if response.status == 200: print(f"Successfully fetched details from: {url}") return await response.text() else: print(f"Warning: HTTP {response.status} for URL {url}") return None except Exception as error: print(f"Error fetching {url}: {str(error)}") return None async def scrape_endpoints(self, endpoints): results = {} async with aiohttp.ClientSession() as session: tasks = [self.fetch_page(session, ep) for ep in endpoints] pages = await asyncio.gather(*tasks) for endpoint, content in zip(endpoints, pages): if content: results[endpoint] = content return results async def main(): scraper = AsyncWebScraper("https://api.github.com") endpoints = ["/rate_limit", "/users/octocat", "/orgs/google"] data = await scraper.scrape_endpoints(endpoints) print(f"Scraped {len(data)} pages successfully.") if __name__ == "__main__": asyncio.run(main())
Focus here and start typing to begin
built for developersReal code typing practice. Useful metrics. Improve faster.Learn more

Codestroke is a code typing test for developers. Practice real JavaScript, Python, SQL, Java, C++, HTML/CSS, PHP, Go, and Kotlin snippets instead of ordinary prose.

This Python typing test focuses on list comprehensions, decorators, and dataclasses. Choose a 30, 60, or 120 second session and track your code typing speed and accuracy as you practice.

Python code typing practice

Practice a Python typing test with realistic snippets that use list comprehensions, decorators, dataclasses, and indentation. The sessions build Python code typing fluency through accurate punctuation and structure.

Try the main code typing test or choose another language from the directory below.

01

Real snippets

Practice syntax, punctuation, and indentation developers actually use.

02

Useful metrics

Track live CPM, accuracy, time, and detailed session results.

03

Flexible practice

Choose a 30, 60, or 120 second test and improve at your pace.

how speed and accuracy work

Code typing speed is measured in CPM (characters per minute), so symbols, brackets, and indentation count just like letters. Accuracy shows how much of the snippet you entered correctly. Pick a language to practice a focused code typing test:

code typing test FAQ

What does the Python typing test include?

The Python test uses realistic snippets with common Python syntax such as functions, list comprehensions, decorators, dataclasses, and indentation.

What is a code typing test?

A code typing test measures how quickly and accurately you can type real source code instead of ordinary prose. Codestroke is built for developers.

How does a coding speed test work?

Code contains symbols, brackets, and short tokens, so CPM measures every typed character. Codestroke also reports WPM, accuracy, and the selected test duration.

Why measure CPM instead of WPM?

Words per minute can be misleading for code because syntax contains punctuation and short tokens. CPM gives a clearer view of code typing speed.

Which languages can I practice?

You can practice JavaScript, Python, SQL, Java, C++, HTML/CSS, PHP, Go, and Kotlin snippets.

Is Codestroke free?

Yes. The typing test is free in modern web browsers, and you can begin as a guest without creating an account.

language directory9 Language Speed Tests & Technical ExplainerExplore

Python typing practice for readable indentation

Use Python snippets that combine small utility functions with data structures and asynchronous code. This route is useful when you want to make indentation, underscores, colons, and compact expressions feel automatic while your coding speed improves.

01list and dictionary comprehensions

02decorators, classes, and type hints

03asyncio flows and nested indentation

Python has fewer braces, so a missing colon or one misplaced indent can change the rhythm of a whole line. Compare code typing scores on the leaderboard.

CPM vs WPM in CodeCode snippets contain symbols, brackets, and short tokens. CPM (Characters Per Minute) measures every keypress accurately, while WPM equals CPM divided by 5.
Real Snippets & DurationsPractice 30s, 60s, or 120s sessions with real language syntax across 9 programming languages in guest mode or with optional account sync.