Question: Write a function slice _ from ( string: str , start: int, end: int ) - > str which returns the characters in string from

Write a function
slice_from(string: str, start: int, end: int)-> str
which returns the characters in string from index start up to, but not including, index end.
Note that this characteristic of including the character at the start index, but excluding the one at the end index, is the default slicing behavior.
Write a function
reverse_string(string: str)-> str
which returns the characters in string in reverse order.
To obtain credit for the slice_from and reverse_string task, you must only use a single slice statement.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Finance Questions!