fork(2) download
  1. # your code goes here
  2. '''
  3. write a function that has two string parameters s1 and s2, and returns
  4. true if if s1 contains s2
  5. '''
  6. s1 = 'rainbow'
  7. s2 = 'bow'
  8. expected = True
  9.  
  10. def contains(s1, s2):
  11. # write your code here
  12. result = s2 in s1
  13. return result
  14.  
  15. actual = contains(s1, s2)
  16. print(actual == expected)
Success #stdin #stdout 0.05s 9624KB
stdin
Standard input is empty
stdout
True