Skip to content

Commit

Permalink
fix(strings): solved bug034
Browse files Browse the repository at this point in the history
  • Loading branch information
elisabettabray committed Dec 13, 2023
1 parent 7fcacee commit f5b856d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/BUG/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def substring_before(s: str, sub: str) -> str:
"""
BUG034: substring_before should return the substring before the first occurrence of sub, not after it.
"""
result = s.split(sub)[1]
result = s.split(sub)[0]
return result


Expand Down

0 comments on commit f5b856d

Please sign in to comment.