Todos Nuevo

user:thomas gists creados por el usuario

title:mygist gists con el título indicado

description:sync gists with given description

filename:myfile.txt gists que contienen archivos con el nombre indicado

extension:yml gists que contienen archivos con la extensión indicada

language:go gists que contienen archivos con el lenguaje indicado

topic:homelab gists with given topic

all:systemctl search all fields

Iniciar sesión

Todos Nuevo Iniciar sesión

Todos los gists

Recientemente creado
Menos reciente creado
Recientemente actualizado
Menos reciente actualizado

derplex / primes.py

0 gustos
0 bifurcaciones
1 archivos
Última actividad 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)
Siguiente Anterior

Desarrollado por Opengist ⋅ Load: 22ms⋅

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