What will be the output of the following Python code?
import time
for i in range(0,5):
print(i)
time.sleep(2)
import time
for i in range(0,5):
print(i)
time.sleep(2)A. After an interval of 2 seconds, the numbers 1, 2, 3, 4, 5 are printed all together
B. After an interval of 2 seconds, the numbers 0, 1, 2, 3, 4 are printed all together
C. Prints the numbers 1, 2, 3, 4, 5 at an interval of 2 seconds between each number
D. Prints the numbers 0, 1, 2, 3, 4 at an interval of 2 seconds between each number
Answer: Option D

Join The Discussion