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

Python > Warmup-2 > last2
prev  |  next  |  chance

Given a string, return the count of the number of times that a substring length 2 appears in the string and also as the last 2 chars of the string, so "hixxxhi" yields 1 (we won't count the end substring).

last2('hixxhi') → 1
last2('xaxxaxaxx') → 1
last2('axxxaaxx') → 2

...Save, Compile, Run         


Show output only (no red/green)

prev  |  next  |  chance   |  CodingBat  >  Warmup-2

Forget It! -- delete my code for this problem

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

Python Help

215.0

Copyright Nick Parlante 2006-11 - privacy