I need the pick first 3 numbers if input numbers. Example;
23456.43 = 234
7348593.8304853 = 734
1.097493 = 109
27.7481 = 277
How can I do that in Python?
I need the pick first 3 numbers if input numbers. Example;
23456.43 = 234
7348593.8304853 = 734
1.097493 = 109
27.7481 = 277
How can I do that in Python?
try this
number = 23.4563
x = int(str(number).replace('.', '') [:3])
print(x)
output :
234