Answers for "Given a list of ints, return True if the array contains a 3 next to a 3 somewhere."

0

Given a list of ints, return True if the array contains a 3 next to a 3 somewhere.

def has_33(x):
    for i in range(len(x)-1):
        if x[i:i+2] == [3,3]:
            return True
        else:
            return False
Posted by: Guest on May-13-2021

Code answers related to "Given a list of ints, return True if the array contains a 3 next to a 3 somewhere."

Python Answers by Framework

Browse Popular Code Answers by Language