<reponame>tiago040/CODEWARS-SOLUTIONS<gh_stars>0
'''
Can you find the needle in the haystack?

Write a function findNeedle() that takes an array full of junk but containing one "needle"

After your function finds the needle it should return a message (as a string) that says:

"found the needle at position " plus the index it found the needle, so:

find_needle(['hay', 'junk', 'hay', 'hay', 'moreJunk', 'needle', 'randomJunk'])
'''

def find_needle(array):
    return str('found the needle at position {}'.format(array.index('needle')))
'''
Can you find the needle in the haystack?

Write a function findNeedle() that takes an array full of junk but containing one "needle"

After your function finds the needle it should return a message (as a string) that says:

"found the needle at position " plus the index it found the needle, so:

find_needle(['hay', 'junk', 'hay', 'hay', 'moreJunk', 'needle', 'randomJunk'])
'''

def find_needle(array):
    return str('found the needle at position {}'.format(array.index('needle')))
Can you find the needle in the haystack?  Write a function findNeedle() that takes an array full of junk but containing one "needle"  After your function finds the needle it should return a message (as a string) that says:  "found the needle at position " plus the index it found the needle, so:  find_needle(['hay', 'junk', 'hay', 'hay', 'moreJunk', 'needle', 'randomJunk'])