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 98 views
1 answer 100 views
1 answer 103 views
1 answer 92 views
1 answer 85 views
1 answer 208 views
...