Hide

Problem B
Is substring

Write a function, is_substring_of(potential_substring, potential_superstring), that recieves two strings as parameters. The function returns True if the first string is in the second one, otherwise the function returns False.

Note that we are testing your code differently in this task, please only submit your function definitions, without any code outside the functions! The main python file, which handles input and output, is already provided. You can download and place the main file in the same directory as your python file. You can then run the main python file we provide to try out the samples.

Input

The input consists of two lines, each containing a string. Your function will be called with the two given strings as parameters, with the first input string passed as the first argument to the function, and the second input string passed as the second argument. Each string will consist of $0$ to $80$ letters from the English alphabet, spaces and the special characters ', ?, and !. You do not need to check this.

Output

The output of the function should be a value of type bool, either True or False, depending on whether the first string is a substring of the second string.

This result will be printed as output, so the output will be one line containing the value returned from calling is_substring_of, with the two input strings passed as parameters.

The function is_substring_of will be called exactly once, per execution of the program.

Sample Input 1 Sample Output 1
python
There's a python in my boot!
True
Sample Input 2 Sample Output 2
This is definitely not a substring
It really isn't
False
Sample Input 3 Sample Output 3
python
Reticulated pythons are considered to be the worlds longest snake!
True
Sample Input 4 Sample Output 4
python
I've had it with these motherfucking pythons on this motherfucking plane!
True
Sample Input 5 Sample Output 5
Empty?
True
Sample Input 6 Sample Output 6
 
Space?
False
Sample Input 7 Sample Output 7

True

Please log in to submit a solution to this problem

Log in