9
Python'daki değişkeni dış, ancak global olmayan kapsamda değiştirmek mümkün müdür?
Aşağıdaki kod verildiğinde: def A() : b = 1 def B() : # I can access 'b' from here. print( b ) # But can i modify 'b' here? 'global' and assignment will not work. B() A() B()Fonksiyon değişkenindeki kod bdış kapsamdadır, ancak genel kapsamda değildir. bDeğişkeni B()fonksiyon içinden değiştirmek …
109
python
python-2.7