Python 3.11 has a new upgrade with the display of error messages. Previously, the interpreter would throw an error mentioning the line number and error description, but with this version, the ~ and ^ characters are added to specify where the error actually might be.