sorting lower and upper

Sai_kiran_rachakonda · October 30, 2022
x = 'pytHOnloBBy'
em = []
em1= []
for i in x:
    if i.islower():
        em.append(i.lower())
for j in x:
    if j.isupper():
        em1.append(j.upper())
print(''.join(em+em1))
Output

Comments

Please sign up or log in to contribute to the discussion.