You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
181 B
12 lines
181 B
|
|
def find_in_string(s, c):
|
|
|
|
for pos in range(0,len(s)):
|
|
if(s[pos] == c):
|
|
return pos
|
|
return -1
|
|
|
|
|
|
print(find_in_string('Homer','e'))
|
|
print(find_in_string('Homer','n'))
|
|
|
|
|