samedi 27 juin 2015

How to generate random strings in Label using def?

def mhello():    
    import  string    
    var = (random.choice("hey", "hi" "hello")    
    Label2 = Label(text=var, fg='Red').place(x=130,y=200)

This isn't working, how would I make it so that the label's text randomly generates one of the options?




Aucun commentaire:

Enregistrer un commentaire