0

I need list containing all the printable characters. I’ve already tried with ASCII but there aren’t any accented characters.

Do you how can I find one for Python.

Thanks

  • 1
    Define "printable"? – snakecharmerb Jul 26 '20 at 14:16
  • 1
    @hansolo Those are just the printable ASCII characters, which is a very small set of all printable characters. – chepner Jul 26 '20 at 14:18
  • @chepner Okay. Then maybe we need a better description of `printable`, i guess – han solo Jul 26 '20 at 14:21
  • Does https://stackoverflow.com/questions/3770117/what-is-the-range-of-unicode-printable-characters help? – Karl Knechtel Jul 26 '20 at 14:24
  • @hansolo Absolutely. The mention of accented characters immediately rules out just printable ASCII characters, but there are more extreme cases. For example, neither U+1F1FA nor U+1F1F8 would probably be considered printable in isolation, but together they should produce a single US flag glyph. – chepner Jul 26 '20 at 14:28

1 Answers1

-1

Like this you can get 1,114,112 different characters. If you're looking for common accented letters you will find the in the first few hundred elements of this list.

characters = [chr(i) for i in range(1114112)]
[...,
 'ϗ',
 'Ϙ',
 'ϙ',
 'Ϛ',
 'ϛ',
 'Ϝ',
 'ϝ',
 'Ϟ',
 'ϟ',
 'Ϡ',
 'ϡ',
 'Ϣ',
 'ϣ',
 'Ϥ',
 'ϥ',
 'Ϧ',
 'ϧ',
 ...]
Nicolas Gervais
  • 33,817
  • 13
  • 115
  • 143
  • 2
    Not every codepoint is printable - or even a character: some are accents, for example. – snakecharmerb Jul 26 '20 at 14:14
  • If OP is looking for accents I think he will find what he needs in this list. I'll wait for some feedback from him. He might simply be looking for a more comprehensive list than just the ASCII, and he will definitely find the desired characters from my answer. – Nicolas Gervais Jul 26 '20 at 14:20
  • Or perhaps you can define character for me? – Nicolas Gervais Jul 26 '20 at 14:25
  • @NicolasGervais That's why we have comments on the questions, to ask for such clarifications. – chepner Jul 26 '20 at 14:29
  • This creates a list of *all* Unicode characters, with no regard to whether they are printable or not, so it does not answer the question. – chepner Jul 26 '20 at 14:30