How to declare a real variable with at least 20 digits in Python

1 Answer

0 votes
import decimal	

result = decimal.Decimal('1234567890.1234567890123')

print(result)


'''
run

1234567890.1234567890123

'''

 



answered Jun 26, 2025 by avibootz

Related questions

1 answer 93 views
1 answer 95 views
1 answer 100 views
1 answer 89 views
1 answer 80 views
1 answer 201 views
...