Arrange string characters such that lowercase letters should come first
Given string contains a combination of the lower and upper case letters. Write a program to arrange the characters of a string so that all lowercase letters should come first.
Given:
str1 = PyNaTive
Expected Output:
yaivePNT
Hint:
Iterate each character from a string and check if the current character is the lower or upper case using
islower()string functionSolution:
islower()string function.join()function.Explanation:
need an explanation for this answer? contact us directly to get an explanation for this answer