Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Your while statement isnt behaving as you think. As soon as it enters the while loop it returns 's'. The code following it never executes. return breaks any loop or code execution and will return the value, in this case 's'. It always returns the first three elements because you return the first three elements before any operation in conducted. Furthermore, you should consider completing operations on the list and not loading it into separate variables(n1, n2 n3). From a memory standpoint this is inefficient and IMO is messier than just completing operations on the list itself. These operations can be done on the passed in list itself.