Regroup 5 X18684


Statement
 

pdf   zip

html

Write a function regroup that receives as argument a string consisting of mixed-case letters, and returns a regrouping of the characters in the string. The regrouping is as follows: in the returned string, first there come the lower-case letters, in the same order as they came in the argument string; and next come the upper-case letters, in the same order as they came in the argument string.

Sample session
>>> regroup('rTbS')
rbTS
>>> regroup('aDFtrZXpw')
atrpwDFZX
>>> regroup('allarelower')
allarelower
>>> regroup('ALLAREUPPER')
ALLAREUPPER
Information
Author
ProAl
Language
English
Official solutions
Python
User solutions
Python