# Lab_7_Exercise_1_Problem_11.py

# Write a recursive function that finds a character in a string.
# It will be helpful if we first figure out how to define a string recursively.
# Also, let’s write the main part of the program from which we will be calling
# (i.e., testing) our function.


def findString(target, string):
 if len(string) == 0 :
   result = False
 else:
   if string[0] == target:
       result = True
   else:
     result = findString(target, string[1:len(string)])
 return result


#Main part of the program
aString = input("Pleas, enter the string to search: ")
aTarget = input("Pleas, enter the target character to search for: ")
result = findString(aTarget, aString)
print("Is target {} in string {}? {} ".format(aTarget, aString, result))