Spy Game
Lesson 5 of 12 in Coddy's Python Interview Series course.
Challenge
MediumWrite a function spy_game that takes in a list of integers and returns True if it contains 007 in order
a1- integer-array
Example:
Input - [1,2,4,0,0,7,5]
Expected Output - True
Explanation - 0 0 7 comes in an order. Hence, it returns True
Try it yourself
def spy_game(a1):
# Write code hereAll lessons in Python Interview Series
1Crack Python Coding Interview
Lesser of two evensPangram Unique ElementsAnimal CrackersSpy GameMatching StringPalindrome or NotBlackJackFind DuplicatesEncodeHash 33First Non-Repeating Character