- Dealing with the Tkinter Text Widgets Indexing System.
- index = '140.2020'
- split = index.split('.')
- nindex = [int(i) for i in split]
- print nindex
- int(index.split('.')[-1])
- int(str(index).split('.')[-1])
- def after_period(number):
- return int(str(number).partition(".")[2])
- for num in [1.24345, 1455.24]:
- whole, dec = divmod(num, 1)
- print num, whole, dec