tkinter text change text code example
Example 1: text widget get tkinter
contents = text.get(1.0, END)
Example 2: text color python tkinter
from tkinter import *
root=Tk()
l1=Label(root,text="hello world",fg="red").pack()
contents = text.get(1.0, END)
from tkinter import *
root=Tk()
l1=Label(root,text="hello world",fg="red").pack()