help?? on functions
lokeshkoppaka at gmail.com
lokeshkoppaka at gmail.com
Mon May 27 00:48:34 EDT 2013
def shuffle(input, i, j):
pass
input = input[i:j+1] +input[0:i] + input[j+1:]
def test_shuffle():
input = [1, 2, 3, 4, 5, 6]
shuffle(input, 1, 2)
assert [2, 3, 1, 4, 5, 6] == input
i had done the above code but the problem is i had manipulated the "input" in function shuffle(input, i, j) but once i get back to the test_shuffle() function again the variable "input" does not reflect the changes made in shuffle(input, i, j) why ,please can any one describe why . and help how to reflect that change to the variable "input".
More information about the Python-list
mailing list