Getting the total number of lines in a Tkinter Text widget?,int(text_widget.index('end-1c').split('.')[0])