is it possible to get list of all characters ?! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3

is it possible to get list of all characters ?!

i looked for a way to print all the characters from A to Z , but i didn't find, can someone help me please ?

16th Feb 2019, 1:27 AM
Nakamatori
Nakamatori - avatar
3 Answers
+ 5
A has an ASCII value of 65. Therefore, AtoZ= [chr(I) for I in range(65, 92)]
16th Feb 2019, 1:31 AM
👑 Prometheus 🇸🇬
👑 Prometheus 🇸🇬 - avatar
+ 3
If you can't remember that 'A' is 65 use the reverse of chr() <-> ord(). AtoZ = [chr(i) for i in range(ord('A'),ord('Z')+1)] Python has a built in string See following example. https://code.sololearn.com/cATMevhL9uLR/?ref=app
16th Feb 2019, 3:40 AM
Louis
Louis - avatar
+ 3
This code is not mine. But I think you can find in it what you need. https://code.sololearn.com/c195fjflDL5F/?ref=app
16th Feb 2019, 6:23 AM
Maias Alakramy