If you want to keep the same type, make :
>>> data = list(Letters[0])
To print
all characters in same line, pass ''
to end
parameters of print
method:
>>> print(Fore.WHITE, x, end='')
Also, your if-else
block needs fixing, since you are checking for almost all your conditions, see below updated code, this way you will be checking only one time for each character:
from colorama import init, Fore
init(convert=True)
Letters= ['QWERTYUPOIFSAJKVMPFOQWKFWSPAEOOIUSKFISPLCKSKLJHXIWTSLAVW']
data = list(Letters[0])
Selection1 = ['C','L','D','O','I']
Selection2 = ['K','W','Y']
Selection3 = ['N','V']
Selection4 = ['A','G','D']
for x in data:
if x in Selection1:
print(Fore.YELLOW, x, end='')
elif x in Selection2:
print(Fore.GREEN, x, end='')
elif x in Selection3:
print(Fore.LIGHTRED_EX, x, end='')
elif x in Selection4:
print(Fore.BLUE, x, end='')
else:
print(Fore.WHITE, x, end='')