mercredi 8 janvier 2020

How to get a multiple results from a script

I'm new to python. I just want a simple app that shuffles submitted figures.

import random

figures = list("0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF0123456789ABCDEF")
random.shuffle(figures)
print(''.join(figures))

Result: E630938F69F4957AD6DBC12DE28A35F7EA8C6512409BCE0518FB432AC7410B7D

This is almost what I wanted. But is it possible to get multiple results without copy-pasting the 3 lines of code? My apologies for the dummy question. Thanks in advance.




Aucun commentaire:

Enregistrer un commentaire