vendredi 12 juillet 2019

How do I go about setting a varible value from input?

I'm new to python, maybe someone can explain this? Im trying to assign a variable a value depending on yes or no.

def direction(decision):
    if decision == "x":
        x_var.set(CW)
    elif decision == "z":
        x_var.set(CCW)
    return


direction(x)

print(x_var)

Aucun commentaire:

Enregistrer un commentaire