Tkinter window background image
📁 tkinter
How to set a background image for the entire window in Tkinter? So that all buttons are on top
We iterate through each element in the loop and try to convert it to an integer. If successful - assign it to the element, if not - report (or not) and move to the next element.
a = [""1"", ""2"", ""hello"", ""3"", ""hello""]for index in range(len(a)): try: a[index] = int(a[index]) except ValueError: print(""not a number"") # or whatever, pass for exampleprint Log in to leave an answer