Marvell Technology Interview Question

Find how much substrings you have in an Input string using python.