Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Change the function changeStr(lst1,s1,s2) where lst1 is a list of strings, and s1 and s2 are strings so it looks at each element in the

Change the function changeStr(lst1,s1,s2) where lst1 is a list of strings, and s1 and s2 are strings so it looks at each element in the list and checks if the last three letters in the element are the same as those in s1. If the last three characters are the same as s1, it will change the string to replace s1 with s2 and save the element with the changed string. If the element does not end with s1, the original value of the element is kept. This function returns a list with the updated changes. s1 will always be of length 3. The list elements will always be a minimum of length 3

image text in transcribed

lst 123456 333 2156 111 222333 333133313133 j change Str (lst, 333 a 123456 3332156 1112 22a 333133313133 change Str (lst, 456 a 123a 333 2156 111 222333 333133313133 lsta I' 123456 333 2156 111 222333 333133313133 156 change Str (lst, 456 a 123a. 3332156 111222333 333133313133 156 J change Str (lst, 333 a I' 12:34:56 333 2156 111 222a. 333 133 313133 156' change Str (lst 1156 a I' 123456 3332a 111222333 333133313133 'a J

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle PL/SQL Programming Database Management Systems

Authors: Steven Feuerstein

1st Edition

978-1565921429

More Books

Students also viewed these Databases questions

Question

LO1 Understand risk management and identify its components.

Answered: 1 week ago