Mar-24-2021, 11:47 PM
(Mar-24-2021, 02:25 AM)BashBedlam Wrote: def has_33(nums): length = len (nums) - 1 for i in range (length): if nums [i] == 3 and nums [i+1] == 3: return True return False print (has_33([1, 3, 1, 3]))print (has_33([3, 1, 3]))print (has_33([1, 3, 3]))Ok! It's working now. Thank you! I replaced the "quit()" with "returns" as you suggested and it appears to work, both with the code I had written and what you had written.