Answer:
The function in python is as follows:
def reverse_list(nums):
half =int(len(nums)/2)
for i in range(half):
nums[i], nums[len(nums)-i-1] = nums[len(nums)-i-1],nums[i]
print(nums)
Step-by-step explanation:
This defines the function
def reverse_list(nums):
This gets the half the length of the list
half =int(len(nums)/2)
This iterates through the list
for i in range(half):
This swaps list items with the opposite item on the other half
nums[i], nums[len(nums)-i-1] = nums[len(nums)-i-1],nums[i]
This prints the new list
print(nums)