Q. What is the output of for i in range(1, 4): print(i)?

A
0 1 2 3
B
1 2 3
C
1 2 3 4
D
Error
Solution:

range(1, 4) iterates over 1, 2, 3, printing each on a new line.

Entri Contact Image

Get Expert Advice for Free: Register for Your Free Consultation Now!