Search code examples
pythonalphabetchr

Printing the alphabet on one line python


How can I print the alphabet on one line using chr(), with each letter seperated by a space.

My current code:

for x in range(97,123):
    letter = chr(x)
    alphabet = "" + letter
    print alphabet

Solution

  • Use , after print statement so that

    print alphabet,