Your question is open to interpretation in multiple different ways because the term 'symbol' has no single universal definition.
In the context of 'characters' there is a connection to 'symbols', i.e. the shapes and glyphs you see as a human which appear to you on a display device as something that you might recognise as text, numbers, punctuation, emojis, etc.
A key aspect of the term 'character' is that it typically refers to a construct which has a well-defined, direct electronic representation using integers (e.g. based on character sets such as UTF8 or ASCII), so is often treated as a primitive construct in programming languages.
The term 'symbol', while being ambiguous, could be seen in the context of text characters as referring to visual glyphs or shapes on a visual display or output device (or even sequences/collections of shapes, such as words or multi-character operators); meaningful to humans but generally meaningless or at least very hard for computers to understand the shapes/patterns by themselves -- i.e. computers have no idea what the various pixel-patterns or colours actually mean.
That is to say, it would typically require some reasonably sophisticated image/text recognition algorithm to determine that a pixel pattern shaped as
A should indeed be interpreted as an ASCII or Unicode integer for
'A' (and that interpretation may even have a small chance to fail).
The term 'symbol' is not clearly defined, but a common concept behind the term is that it refers to human-relatable semantics rather than electronic representation.
In addition, not all electronic characters are associated with symbols; for example,
EOF is a non-printable control character which is used to denote the end of a byte stream -- it's really handy for electronic devices but useless to humans.
If I were to take a guess about the example code in the question, I might wonder whether white-space characters (tab/space/newline/CR) could also be excluded from the definition of "symbol" being that humans generally use whitespace for separation/layout/formatting, but this would be a matter of consulting the documentation and understanding what the original programmer meant by the term "symbol" -- people frequently choose unclear, ambiguous and misleading names in their code.