mardi 30 novembre 2021

how to make output line up (Ex. '12345') in python?

i have written a simple number generation function but i want the output to line up horizontally('234567') and not vertically like it currently outputs.

import random

def get_num():
    listz = [1,2,3,4,5]
    for x in listz:
        print(random.randrange(1,7))
    

get_num()



Aucun commentaire:

Enregistrer un commentaire