Examveda

How do you convert a string containing an integer to an integer data type?

A. int("5")

B. integer("5")

C. to_int("5")

D. convert("5", int)

Answer: Option A

Solution (By Examveda Team)

The int() function converts a string containing an integer to an integer.

This Question Belongs to Python Program >> Data Types And Numeric Types

Join The Discussion

Related Questions on Data Types and Numeric Types