Menu
Coddy logo textTech

Spy Game

Lesson 5 of 12 in Coddy's Python Interview Series course.

challenge icon

Challenge

Medium

Write 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 here

All lessons in Python Interview Series