What will be the output of the following Python code? [code]g = (i for i in range(5)) type(g)[/code]

Phương Quyên

New member
What will be the output of the following Python code?
Code:
g = (i for i in range(5))
type(g)
A. class <’loop’>
B. class <‘iteration’>
C. class <’range’>
D. class <’generator’>
 

Tìm kiếm

Back
Top