Todos Novo

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

Entrar

Todos Novo Entrar

Todos os gists

Mais recente criado
Menos recente criado
Mais recente atualizado
Menos recente atualizado

derplex / primes.py

0 curtidas
0 bifurcações
1 arquivos
Última atividade 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)
Próximo Anterior

Desenvolvido por Opengist ⋅ Load: 20ms⋅

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