У меня есть этот код Python (3.7.2):
import tkinter as tk
root = tk.Tk()
art = '''
uu$$$$$$$$$$$uu
uu$$$$$$$$$$$$$$$$$uu
u$$$$$$$$$$$$$$$$$$$$$u
u$$$$$$$$$$$$$$$$$$$$$$$u
u$$$$$$$$$$$$$$$$$$$$$$$$$u
u$$$$$$* *$$$* *$$$$$$u
*$$$$* u$u $$$$*
$$$u u$u u$$$
$$$u u$$$u u$$$
*$$$$uu$$$ $$$uu$$$$*
*$$$$$$$* *$$$$$$$*
u$$$$$$$u$$$$$$$u
u$*$*$*$*$*$*$u
uuu $$u$ $ $ $ $u$$ uuu
u$$$$ $$$$$u$u$u$$$ u$$$$
$$$$$uu *$$$$$$$$$* uu$$$$$$
u$$$$$$$$$$$uu ***** uuuu$$$$$$$$$
$$$$***$$$$$$$$$$uuu uu$$$$$$$$$***$$$*
*** **$$$$$$$$$$$uu **$***
uuuu **$$$$$$$$$$uuu
u$$$uuu$$$$$$$$$uu **$$$$$$$$$$$uuu$$$
$$$$$$$$$$**** **$$$$$$$$$$$*
*$$$$$* **$$$$**
$$$* $$$$*
'''
print(art)
label = tk.Label(text=art)
label.pack()
root.mainloop()
Он печатает череп в консоли и в Tkinter.Но в Tkinter он отформатирован неправильно.(Ошибки не выдаются)
Вопросы
- Почему Tkinter (Label) имеетдругой формат?
- Как я могу это исправить?
Этот единственный связанный пост, но он не помог.