"""
Exercise 4:

There is a string method called count that is similar to the function in the previous exercise.
Read the documentation of this method at https://docs.python.org/3.5/library/stdtypes.html#string-methods and
write an invocation that counts the number of times the letter a occurs in "banana".

"""

#method Name; str.count(sub[,start[,end]])

count = 'bananna'.count('a', 2, 5)
print(count)

print('bannana'[0:5]) #substring
