Examveda

What will be the output of the following Python code?
import math
[str(round(math.pi)) for i in range (1, 6)]

A. ['3', '3', '3', '3', '3', '3']

B. ['3.1', '3.14', '3.142', '3.1416', '3.14159', '3.141582']

C. ['3', '3', '3', '3', '3']

D. ['3.1', '3.14', '3.142', '3.1416', '3.14159']

Answer: Option C


This Question Belongs to Python Program >> Lists In Python

Join The Discussion

Related Questions on Lists in Python