DEV Community

Discussion on: How to analyse and aggregate data from DynamoDB

Collapse
 
alexcann profile image
alex-cann

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
Collapse
 
michabahr profile image
Michael Bahr

Thanks for the tip!