upper_count = sum(1 for char in string if char.isupper()) lower_count = sum(1 for char in string if char.islower()) ...