Question: String my _ string is read from input. Assign variable sub _ string with all the characters in my _ string, except for the first

String my_string is read from input. Assign variable sub_string with all the characters in my_string, except for the first and last characters.
Click here to show example
Ex: If the input is:
Practice makes perfect
then the output is:
ractice makes perfec
1 my_string = input()
2
3 start_index: 1
4 end_index: -2
5
6 #sub_string = my_string
7
8 print(sub_string)
 String my_string is read from input. Assign variable sub_string with all

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 Databases Questions!