Examveda

What will be the output of the following Python code snippet?
{a**2 for a in range(4)}

A. {1, 4, 9, 16}

B. {0, 1, 4, 9, 16}

C. Error

D. {0, 1, 4, 9}

Answer: Option D


This Question Belongs to Python Program >> Sets In Python

Join The Discussion

Related Questions on Sets in Python