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

 

dvermes@scarsdaleschools.org > rfind
prev  |  next  |  chance

Write a function that returns the highest index of sub in s, or -1 if not found. Do NOT use the built-in rfind, find, split, or replace functions.


rfind('The dog was walking and saw a fox and ran', 'an') → 39
rfind('The dog was walking and saw a fox and ran', 'he') → 1
rfind('The dog was walking and saw a fox and ran', 'bird') → -1

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

def rfind(s, sub):

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: 100

Copyright Nick Parlante 2017 - privacy