Booleans values at funtions in Python
I'm trying to write a code that supposes a online buying; it takes the user information and confirm if it is ok. I wrote a function that confirm if each data is correct with a boolean value, the problem is that the boolean value (defined as False out of the function) only changes inside the function, then it returns to the initial value (False). I tried with "return" after change the value, how I can change it inside the function without it returns to the initial value? (Sorry for my English, I'm still studying) Estoy intentando escribir un cĂłdigo que supone una compra en lĂnea; toma la informaciĂłn del usuario y confirma si es correcto. EscribĂ una funciĂłn que confirma si es correcto cada dato con un valor booleano (booleans), el problema es que el valor booleano (definido como Falso fuera de la funciĂłn) solo cambia dentro de la funciĂłn, despuĂ©s vuelve al valor inicial (Falso). IntentĂ© con "return" despuĂ©s cambiar el valor, ÂżcĂłmo puedo cambiarlo dentro de la funciĂłn si que regrese al valor inicial?