# Accept string input.
# Display each charter of the string (vertical order)
# Count and display total i charter in the string.
str_in = input('string is: ')
count = 0
for ch in str_in:
print(ch)
if ch.lower() == 'i':
count += 1
print(f'{count} i charter in the string')
Comments
Leave a comment