ammar azif wrote: > Something in python disturbs me , > > when i write a for loop, > > i am able to access the variable declared in that loop after the loop > finishes which i am not able to do in languages like c/c++ or java. Is > it different in python?
Yes, it is different. In Python a block is not a scope. Names bound within the block, including the loop variable, are accessible outside the block. Kent _______________________________________________ Tutor maillist - [email protected] http://mail.python.org/mailman/listinfo/tutor
