aboutsummaryrefslogtreecommitdiff
path: root/challenge-001/lubos-kolouch/python/ch-1.py
blob: 43c1d4378a226f5614820b4230e7026fe7fab319 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def replace_e(what: str):
    count = what.count("e")
    modified_what = what.replace("e", "E")
    return count, modified_what


# Simple test to verify the functionality
assert replace_e("Perl Weekly Challenge") == (5, "PErl WEEkly ChallEngE")