0

I make a substrings function, it seems to work for me, but i cant pass check.

:( handles one substring in common Expected 1 matches, not 0

:( handles multiple substrings in common Expected 4 matches, not 0

:( handles substrings when strings are identical Expected 4 matches, not 0

:) handles substring length longer than string length

:( handles duplicate substrings in common Expected 4 matches, not 0

[hide solution code]

for i in sub:
    if i not in substring:
        substring.append(i)
    return substring
0

Your final return substring is indented inside the for loop, rather than running on its own after the loop.

3
  • Unfortunately its not it. This happened when i was coping cod to here. I check it one more time, in terminal and in check window its correct.
    – Tory
    Aug 22 '19 at 17:56
  • Can you run check50 again and post the results URL here?
    – curiouskiwi
    Aug 22 '19 at 20:24
  • Thank you for trying to help me. I get what it was about. I was cutting each word on substring in stead to cut all text.
    – Tory
    Aug 24 '19 at 18:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .