Aug-09-2017, 11:56 AM
Lets just assume the code below can't be altered. Can someone please explain to me the (last_index, -1, -1): part? I understand for i in range (last_index but I am unsure about the additional -1 -1). Thank you in advance
1 2 3 4 5 6 |
text = input ( 'Line: ' ) last_index = len (text) - 1 backwards_text = '' for i in range (last_index, - 1 , - 1 ): backwards_text = backwards_text + text[i] print (backwards_text) |