[Tutor] How to run this block of code dozens of times

Scurvy Scott etanes.rm at gmail.com
Mon Sep 17 01:50:07 CEST 2012

Hello all, I'm just wondering how to run this block of code X amount of
times (a lot) and then store the ouput to a .txt file.

The code I've written is below.

from Crypto.PublicKey import RSA
import hashlib
m = RSA.generate(1024)
b = hashlib.sha1()
a = b.hexdigest()
print a[:16] + '.onion'

Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120916/d613a94e/attachment.html>

More information about the Tutor mailing list