I am making a library in Python, and I have a function that is supposed to create a new line of text in a GUI every time you use it. This is using Tkinter as the graphical library it's built on top of.
I first tried
def newtext(n,t):
str(n) = Label(text=t)
with
from aiui import *
newtext("test","test")
In the other file,
This didn't work, which was expected because you can't put a variable in a string for it to work, but I wanted to try anyway. Then I tried just putting it as n without the str
modifier, but obviously that didn't work. Now I'm stuck and don't know what to try. Is there a function or way you can even do this?