Problem Description
Noticed when writing code using notebook with default settings
When entering parentheses for a function’(‘&’)’
I found that the code automatically added two spaces at the end
Running the program will result in an error
The error message is as follows
Cell In[22], line 1
import matplotlib.pyplot as plt
^
SyntaxError: invalid non-printable character U+00A0
Finding
After testing the characters, it was found that symbols that need to be entered by holding down shift (such as *
{
}
"
) will add two spaces after the symbol when inputting. In contrast, symbols that are input directly by pressing keys (such as [
]
=
), this problem will not occur when typing
Is there a problem with the settings?