Skip to content
Advertisement

Tag: text

Printing a list to a Tkinter Text widget

I have a list of strings, and I want to print those strings in a Tkinter text widget, but I can’t insert each string in a new line. I tried this but didn’t work: Answer Append newline (‘n’) manually: BTW, you don’t need to use index to iterate a list. Just iterate the list. And don’t use list as a

Remove very last character in file

After looking all over the Internet, I’ve come to this. Let’s say I have already made a text file that reads: Hello World Well, I want to remove the very last character (in this case d) from this text file. So now the text file should look like this: Hello Worl But I have no idea how to do this.

Advertisement