+ 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 ?
3 Answers
+ 5
A has an ASCII value of 65.
Therefore,
AtoZ= [chr(I) for I in range(65, 92)]
+ 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
+ 3
This code is not mine.
But I think you can find in it what you need.
https://code.sololearn.com/c195fjflDL5F/?ref=app