PyQt5 QLabel() string contains < > [duplicate]

QLabels take HTML, so you can use html.escape on the value you are interpolating:

self.label.setText(f'<font color = "#E4551F">{num}:</font> {html.escape(myString)}')

This will convert < and > to &lt; and &gt;. It will also make & work correctly.