MCPcopy Create free account
hub / github.com/geekcomputers/Python / swapList

Function swapList

Python_swapping.py:5–13  ·  view source on GitHub ↗
(newList)

Source from the content-addressed store, hash-verified

3
4# Swap function
5def swapList(newList):
6 size = len(newList)
7
8 # Swapping
9 temp = newList[0]
10 newList[0] = newList[size - 1]
11 newList[size - 1] = temp
12
13 return newList
14
15
16# Driver code

Callers 1

Python_swapping.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected