Hello! While making otp with Python, I have a question, so I'm asking you this question!
I want to print out only 6 digits of the algorithm that makes the otp value, but there is a problem with 7 to 9 digits!
So, how can I change the value from 7-8 digits in Python to 6 digits?
python-2.5
In a simple way, you can reduce the number of digits through the remaining operations.
ex)
otp = 18573829
new_otp = otp % 1000000
print(new_otp)
Both 7-digit and 9-digit numbers are converted to 6-digit numbers.
© 2024 OneMinuteCode. All rights reserved.