There's some French in the code but don't worry about it, the only thing I want to do here is add something that will prevent me from entering a string under 4 in ch1 and at least 1 character in ch2. this code works for what I'm doing.
ch1 = input("Entre the first chain:")
ch2 = input('Enter the second chain:')
resultat = 0
sub_len = len(ch2)
for i in range(len(ch1)):
if ch1[i:i+sub_len] == ch2:
resultat += 1
print('Chaîne 1 saisie: {}'.format(ch1))
print('Chaîne 2 saisie: {}'.format(ch2))
print('Réponse: La chaîne 2 se retrouve {} fois dans la châine 1.'.format(resultat))