Skip to content

Python code snippet – How to get number after decimal point?

decnm = "0"+str(number-int(number))[1:]
float(decnm)
See also  Shuffle a list using Fisher-Yates algorithm in Python
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.