I need help on how to display the result of the following code in separate lines:
import random
import string
random.choice(string.ascii_letters)
random = ''.join([random.choice(string.ascii_letters) for n in range(3)])
print (random.lower())
I've made several searches to find help, like this: Printing out a random string (Python)
But it only tells me how to create and print a random string (like this: a, b, c) but not like this (which is what I need):
a
b
c
I use python 3.6.0 by the way.
Aucun commentaire:
Enregistrer un commentaire