def xyz(a,n):
for i in range(0,len(a)):
if a[i]==n:
returni
return -1
a=[1,2,3,4,5,6,7,8,9]
n=int(input("Enter the number to search:"))
r=xyz(a,n)
if r!=-1:
print("element found at index:",str(r))
else:
print("element not found")
ZGVmIHh5eihhLG4pOgogICBmb3IgaSBpbiByYW5nZSgwLGxlbihhKSk6CiAgICAgICAgaWYgYVtpXT09bjoKICAgICAgICAgICAgcmV0dXJuaQogICAgICAgIHJldHVybiAtMQphPVsxLDIsMyw0LDUsNiw3LDgsOV0Kbj1pbnQoaW5wdXQoIkVudGVyIHRoZSBudW1iZXIgdG8gc2VhcmNoOiIpKQpyPXh5eihhLG4pCmlmIHIhPS0xOgogICBwcmludCgiZWxlbWVudCBmb3VuZCBhdCBpbmRleDoiLHN0cihyKSkKZWxzZToKICAgcHJpbnQoImVsZW1lbnQgbm90IGZvdW5kIik=