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

 

david.white@denison.edu cs112fall2015 > findall
prev  |  next  |  chance

Write a Python function

findall(text, pattern)
that returns a list called
 results
of integers of all the starting indices of all non-overlapping occurrences of the string
pattern
in the string text.

findall('Now is the time for all good men to come to the aid of their countrymen', 'the') → [7, 44, 55]
findall('Te hehehehe ', 'hehe') → [3, 7]
findall('Te hehehehe', 'te') → []

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

def findall(text, pattern):

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

Copyright Nick Parlante 2017 - privacy