From 295f57c0d7bfdf15b661a685d8522b3e7ca055d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 29 Dec 2018 17:01:35 +0100 Subject: [PATCH] Iterators --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 57ab0ab..3da3616 100644 --- a/README.md +++ b/README.md @@ -934,7 +934,7 @@ Itertools from itertools import * ``` -### Combinatoric iterators +### Combinatoric Iterators ```python >>> combinations('abc', 2) [('a', 'b'), ('a', 'c'), ('b', 'c')] @@ -958,7 +958,7 @@ from itertools import * (1, 0, 0), (1, 0, 1), (1, 1, 0), (1, 1, 1)] ``` -### Infinite iterators +### Infinite Iterators ```python >>> i = count(5, 2) >>> next(i), next(i), next(i) @@ -1382,7 +1382,7 @@ def odds_handler(sport): Profile ------- -#### Basic: +### Basic ```python from time import time start_time = time() @@ -1390,7 +1390,7 @@ start_time = time() duration = time() - start_time ``` -#### Times execution of the passed code: +### Timing a Snippet ```python from timeit import timeit timeit('"-".join(str(a) for a in range(100))',