« first day (18 days earlier)      last day (929 days later) » 

6:06 AM
@JohnRennie Hi
 
@Aladdin Hi :-)
 
I had a very small doubt
num = 10
for num in range(5):
    print(num)
print(num)
i thought the final print statement will have num as 10
but it prints it as 5
 
No, because when you do for num in range(5) this sets num to 0, then 1, then 2 etc up to 4.
So it overwrites the original value of 10 that was in num.
 
oh
 
6:27 AM
14 messages moved to Trashcan
Apologies, y'all. Hopefully this is the end of it.
 
Thanks :-)
 
5 messages moved to Trashcan
 

« first day (18 days earlier)      last day (929 days later) »