I'm writing a program that creates a new canvas item, with a specific image depending on a certain variable. Here's an example of what I'm after, with >>>>tag<<<< representing (preferably a string) linked to one of those PhotoImages:
image = PhotoImage(file="File.png")
image_2 = PhotoImage(file="File_2.png")
output = >>>>tag<<<<
c.create_image(0, 0, image=output)
So far, I have been unable to find a way to link a PhotoImage item to a tag or some way of relating it to a different variable. The only other way to do what I want to do would be to create a huge line of "if" statements which would be extremely time-consuming and unnecessary. So any method of tagging would be extremely helpful. Thanks.