Created
January 29, 2019 19:57
-
-
Save snivas/f291b6e301457ef716ff674682df6762 to your computer and use it in GitHub Desktop.
Given an array of ints, return True if the sequence.. 1, 3, 4 .. appears in the array somewhere
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def checkseq(nums): | |
desired = [1, 3, 4] | |
if str(desired)[1:-1] in str(nums): | |
return True | |
return False | |
list123([1, 1, 3, 4, 5]) | |
#True | |
list123([1, 2, 4, 3, 5]) | |
#False | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment