Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/main/lab.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ def get_index_given_character(s, c):
:param c: A character within the string.
:return: The index of the first occurrence of the character within the string.
"""
# This if-statement checks if the character c is an empty string. If it is, the function returns -1, indicating that this behavior is not defined.
# You do not need to modify this code.
if c == '':
return -1

# Change code below this point to implement the functionality specified in the docstring above:
return 0

def string_slicing(s, start, end):
Expand Down