Can anybody explain me the following code. I did not understand what % does. As I know it returns remainder, but I did not get the output i was expecting. What is remainder itself? can you please explain output step by step.
for num in range(20):
if num % 4 == 0:
print num
if num % 16 == 0:
print('XYZ')