Skip to content

Instantly share code, notes, and snippets.

@beefy
Created May 12, 2016 13:55
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beefy/54f67014886021d2e0b5f54c7e1142e1 to your computer and use it in GitHub Desktop.
Save beefy/54f67014886021d2e0b5f54c7e1142e1 to your computer and use it in GitHub Desktop.
A small python script that will crash your computer (not tested thoroughly)
import itertools
for a,b,c in itertools.product(itertools.count(0),xrange(0,10),xrange(0,10)):
print a,b,c
if a > 20: break
@beefy
Copy link
Author

beefy commented May 12, 2016

It never reaches the print statement: itertools.product reads from each generator until they're done, but itertools.count never terminates.

@MichaelLiu0115
Copy link

poop

@jrbergen
Copy link

from itertools import count as crash

list(crash(0)) 

Achieves the same I think.

@WantedWither
Copy link

dosnt work for me

@umarfatahi
Copy link

umarfatahi commented Mar 28, 2022

fuckkkkkkkkkkkkkkkkkkkkkk youuuuuuuuuuuuuuuuu 🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣🤣

@maksiksking
Copy link

This is perfect

@Orington
Copy link

Orington commented May 1, 2024

Bro it doent even work

@D3ijr
Copy link

D3ijr commented May 11, 2024

Welp, I got blue screen of death.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment