DEV Community

Discussion on: How to analyse and aggregate data from DynamoDB

alexcann profile image

One way to handle indefinitely large numbers is to encode the number of digits as a character and prepend it to the string. This won't be perfectly indefinite but it will work for numbers with up to 1,114,111 digits in python.

Sample Python Code:

x = chr(len(x))+x
michabahr profile image
Michael Bahr Author

Thanks for the tip!