0

if I use integer type cast conversion technique then it doesn't work for large numbers like 12630717197566440063

I got wrong answer in some cases like below in python 3

a =12630717197566440063;
print(a)
temp = a/10
print(int(temp))

Then I am getting 1263071719756644096 as a answer instead of 1263071719756644006

1
  • 2
    temp = a // 10 Commented Nov 21, 2020 at 16:23

1 Answer 1

1

You can use the // (floor division) operator:

temp = a//10
print(temp)
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.