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

Python > 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

See also Python Example Code. Python help docs: Python Strings | Python Lists | Python If Boolean


prev  |  next  |  chance   |  CodingBat  >  List-1

Forget It! -- delete my code for this problem

New just for fun
 Random User Progress Graphs
 Random Epic Graphs 112.0

Copyright Nick Parlante 2006-11 - privacy