Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Python Alphabet using list comprehension


var='a'
alphabets=[]
# starting from the ASCII value of 'a' and keep increasing the 
# value by i.
alphabets=[(chr(ord(var)+i)) for i in range(26)]
print(alphabets)
Source by www.pythonpool.com #
 
PREVIOUS NEXT
Tagged: #Python #Alphabet #list #comprehension
ADD COMMENT
Topic
Name
7+5 =