Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Blog
Linear search
def find(word,letter): index=0 while(index<len(word)): if(word[index]==letter) : return index index=index+1 return -1 word=str(input("Enter the sentence :")) letter=str(input("Enter letter to be searched:")) print("The given letter is found at index",find(word,letter))
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
add lambda
HW5, SelectionSort FINNAL
31 dec dil khush
abc
Gauss
Game4
linked_lists_2+decisions
kawaii
cls_var und cls_method
shuru17
Please log in to post a comment.