+ 1
How to do integer in python
3 Respostas
+ 11
Please post your code here, or make some sample data that makes your question better understandable. Thanks!
+ 10
I don't think so that you have this doubt but:
To convert a string to integers, simply use int() function:
a="4"
print(int(a))
#It will be converted to integer.
Others also are:
str()
#for conversion to a string.
#and
float()
#For conversion to a float.
However, it's already explained in the lesson itself.
Just go through it.
+ 7
answer = 42
python knows that 42 is an integer.