9 in List (Problem 4) - InfyTQ Solution in Python
9 in List (Problem 4)
InfyTQ Solution in Python
PROBLEM STATEMENT
Given a list of numbers, write a python function which returns true if one of the first 4 elements in the list is 9. Otherwise it should return false.
The length of the list can be less than 4 also.
Sample Input | Expected Output |
---|---|
[1, 2, 9, 3, 4] | True |
[1, 2, 9] | True |
[1, 2,3,4] | False |
SOLUTION
SHARE
If you find this useful, please share with your friends and Community.
CODE TOGETHER..GROW TOGETHER.
CODE TOGETHER..GROW TOGETHER.
Newer Posts
Newer Posts
Older Posts
Older Posts
Comments