id/email
password
forgot password | create account
about | help | code help+videos | done | prefs
CodingBat code practice

 

List-1 > common_end
prev  |  next  |  chance

Given 2 arrays of ints, a and b, return True if they have the same first element or they have the same last element. Both arrays will be length 1 or more.


common_end([1, 2, 3], [7, 3]) → True
common_end([1, 2, 3], [7, 3, 2]) → False
common_end([1, 2, 3], [1, 3]) → True

...Save, Compile, Run (ctrl-enter)

def common_end(a, b):

Editor font size %:
Shorter output


Forget It! -- delete my code for this problem

Progress graphs:
 Your progress graph for this problem
 Random user progress graph for this problem
 Random Epic Progress Graph

Python Help

Difficulty: 112.0

Copyright Nick Parlante 2017 - privacy