cut_list
We have to use a cut_list by writing a function called cutlist that "cuts" a list. Whwew a list and an index is given, and returns a copy of the list, but the items before and after the index is swapped, but what i dont get is it should run with strings too!
>>> cut_list([0,1,2,3,4,5,6,7,8,9], 3)
[4, 5, 6, 7, 8, 9, 3, 0, 1, 2]
>>> cut_list("ABCDEFGX1234",7)
'1234XABCDEFG'
this is the code i tried:
listA[4,5,6,7,8,9]
listB[3,0,1,2]
listA.insert(listB)
I am not sure what went wrong??