Question: 1. Please write a Python 3 Program and show all outputs. Write some functions that: return a sequence with the first and last items exchanged.
1. Please write a Python 3 Program and show all outputs.
Write some functions that:
return a sequence with the first and last items exchanged.
return a sequence with every other item removed
return a sequence with the first and last 4 items removed, and every other item in between
return a sequence reversed (just with slicing)
return a sequence with the middle third, then last third, then the first third in the new order
NOTE: these should work with ANY sequence but you can use strings to test, if you like.
1. Please write a Python 3 Program and show all output.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
