W/ GLOBAL value NOT kept: HELP! | Sololearn: Learn to code for FREE!
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
0

W/ GLOBAL value NOT kept: HELP!

i'm using global inside a func to modify a previously declared n=0, but once the function has finished to run, if i put in the same code the same function again below that one, n is considered again 0,and not the modified value. How could i keep the modified value to further modify it within the same function repeated more than once?

9th Dec 2019, 11:14 AM
Luca
Luca - avatar
0 Resposta