Write the Python Program to Perform following operation on string “Interpreted Language” a. First one character b. Last one character c. Everything except the first one character d. Everything except the last one character e. Everything between first and last two character f. Skip one character g. Reverse String.
Answers
Answered by
14
Code:
Explanation:
The above operations can be done using string slicing, which is an act of retrieving a subset from a set, using its index values. Each character in the string has its own positive and negative indexing, and a slice command is passed as follows:
- start - represents the starting index
- stop - represents the ending index
- step - represents the step value/by how many values it needs to skip
To know more about slicing, refer to the link below:
brainly.in/question/16088533
Similar questions
Hindi,
17 hours ago
Physics,
17 hours ago
Social Sciences,
1 day ago
Computer Science,
8 months ago
English,
8 months ago