jeudi 19 novembre 2015

How to split the output of random.sample

I'm trying to Join a word and the numbers together here's my code

import random
print(random.choice(['blue', 'aqua', 'jade','plum','gold','navy','pink','grey','ruby' ,'rose','teal']))
print(random.sample(range(10000000,99999999), 1))   

And this is the the outcome

aqua
[67600230]

And I'm trying to get this instead

Aqua 6760 0230 

so the the colour and number are lined together but also spaced out




Aucun commentaire:

Enregistrer un commentaire