156k views
3 votes
Using Phyton

Write a program with the following functions.

function 1: Accepts 2 strings as arguments. returns true if the second string is a part of the first string.

User DaunnC
by
5.4k points

1 Answer

6 votes

def something(string1, string2):

return True if string2 in string1 else False

This would be the most concise way of writing this function.

User Jason
by
5.9k points