Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
a = 95
print(type(a))
a = str("a")
print(type(a))
a = int(a)
print(type(a))


What I have tried:

I tried to convert int to string and than string to int I am facing issue on converting string to int 
Posted
Updated 13-Nov-22 0:42am

1 solution

"a" is not a number!
Try this:
Python
a = 95
print(type(a))
a = str("a")
print(type(a))
a = str("123")
print(type(a))
a = int(a)
print(type(a))
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900