id/email
password
forgot password | create account
about | help | prefs
ReadingBatcode reading practice

 

 

Athenian: Stringsstrings_strip1

prev  |  next  |  chance

Splitting a word from another word
by Savonnah '23

def split(word1, word2):
    result = word1.rstrip(word2)
    return result
Function Call  Return Value
split('carwash', 'wash')
split('strawberry', 'berry')
split('hotdog', 'dog')
split('hamburger', 'burger')

Experiment with this code on Gitpod.io

⬅ Back