TKinter label | Sololearn: Learn to code for FREE!

0

TKinter label

hello comunity, i have a problem (again) i practice with TKinter in a platform online and i have this from Tkinter import * class interfaz: def __init__(self, contenedor): self.e1=Label(contenedor, text="pestaña 1") self.e2=Label(contenedor, text="pestaña 2") self.e3=Label(contenedor, text="pestaña 3") self.e1.pack (side=TOP) self.e2.pack (side=RIGHT) self.e3.pack (side=BOTTOM) ventana = Tk() miinterfaz = interfaz(ventana) ventana.mainloop() the IDE launch a SyntaxError: Non-ASCII character in line 4 but i don't find what is. could you help me?

1/18/2018 4:09:45 PM

Daniel H. Cortez

1 Answer

New Answer

+1

in line 4 there is a special character (the n with the '~' over it which I do not have on my German smartphone keyboard). I would say Your IDE has a problem with this. I recommend to use only characters which are part of the ASCII-character set. In other words: use a normal 'n' instead and I am sure it will work.