aboutsummaryrefslogtreecommitdiff
path: root/challenge-001/paulo-custodio/python/ch-1.py
blob: c56d33b7dda76e7201880925881fcf13839e62b3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env python

# Challenge 001
#
# Challenge #1
# Write a script to replace the character ‘e’ with ‘E’ in the string
# ‘Perl Weekly Challenge’. Also print the number of times the character ‘e’
# is found in the string.

import sys

str = " ".join(sys.argv[1:])
print(str.count('e'), str.replace('e', 'E'))