+ 2
Can I use the list(range()) function to print a list of strings like [a,b,c,d,e....]?
3 Answers
+ 4
You can use list comprehension, like this:
l = [chr(i) for i in range(97, 123)]
['a', 'b', ..., 'z']
0
you can use loops for it.
0
You can use defined constant like 'ascii_lowercase' from string module rather than convert every single character.
Check this out:
https://code.sololearn.com/cTRwmK1LB6En/?ref=app