for j in xrange(10,40,5):
What this loop will generate?
10,15,20,25,30,35
Notice, it will generate 10 but not 40 as the first param is inclusive, but second one is exclusive.
Then which of them is not divisible by 3?
10,20,25,35
Simple as that.
For your added question, see this:
for char in "ABC 123":
print char,
if not char == '3':
count += 1
print count
Output:
A 1
B 2
C 3
4
1 5
2 6
3
I don’t think you would get 5
0
solved 4 lines of python codes. have no clue why it prints out such output