Skip to content

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

decnm = "0"+str(number-int(number))[1:]
float(decnm)
See also  Python code snippet - How to check if a list raises IndexError but wihing a if statement ?
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Leave a Reply

Your email address will not be published.

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