Všechno Nové

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Přihlásit se

Všechno Nové Přihlásit se

Všechny gisty

Nedávno Vytvořeno
Nejméně nedávno Vytvořeno
Nedávno Aktualizováno
Nejméně nedávno Aktualizováno

derplex / primes.py

0 Lajky
0 Forky
1 Soubory
Naposledy aktivní 2 months ago
1 import itertools
2
3 def iter_primes():
4 # an iterator of all numbers between 2 and +infinity
5 numbers = itertools.count(2)
6
7 # generate primes forever
8 while True:
9 # get the first number from the iterator (always a prime)
10 prime = next(numbers)
Novější Starší

Vytvořeno pomocí Opengist ⋅ Load: 18ms⋅

Čeština
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文