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 170 views
1 answer 184 views
1 answer 184 views
1 answer 197 views
1 answer 180 views
1 answer 293 views
...