KnowledgeBoat Logo

Computer Science

int('a') produces error. Why ?

Python Data Handling

20 Likes

Answer

int() converts its argument into an integer. As 'a' is a letter, it cannot be converted into a valid integer hence int('a') produces an error.

Answered By

15 Likes


Related Questions