# Task
Given an initial string `s`, switch case of the minimal possible number of letters to make the whole string written in the upper case or in the lower case.

# Input/Output


`[input]` string `s`

String of odd length consisting of English letters.

3 ≤ inputString.length ≤ 99.

`[output]` a string

The resulting string.

# Example

For `s = "Aba"`, the output should be `"aba"`

For `s = "ABa"`, the output should be `"ABA"`

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Starter code: def case_unification(s):
	

Solutions:
def case_unification(s):
	return s.lower() if sum((1 for i in s if i.islower())) > sum((1 for i in s if i.isupper())) else s.upper()


def case_unification(s):
	return s.upper() if sum((c.islower() for c in s)) < len(s) / 2 else s.lower()


def case_unification(str):
	return str.lower() if sum((1 for ch in str if ch.islower())) > len(str) // 2 else str.upper()


def case_unification(s):
	return s.upper() if sum((x.isupper() for x in s)) / len(s) > 0.5 else s.lower()


def case_unification(s):
	l = sum((1 if i.isupper() else -1 for i in s))
	return s.lower() if l < 0 else s.upper()


def case_unification(s):
	return s.upper() if sorted(s)[len(s) // 2].isupper() else s.lower()


from re import finditer

def case_unification(word):
	return word.lower() if len(list(finditer('([a-z])', word))) > len(list(finditer('([A-Z])', word))) else word.upper()


def case_unification(s):
	lower = sum((c.islower() for c in s))
	upper = len(s) - lower
	func = str.upper if upper > lower else str.lower
	return func(s)