extend alphabet list in python

To extend the alphabet list in python, you can use the extend method of python lists. Here's the code to add lowercase alphabet characters to an existing list:

main.py
alphabet = ['a', 'b', 'c']
alphabet.extend(['d', 'e', 'f'])
print(alphabet)
76 chars
4 lines

This will output:

main.py
['a', 'b', 'c', 'd', 'e', 'f']
31 chars
2 lines

You can use the same method to add uppercase characters or any other characters as well.

gistlibby LogSnag