Contact: aviboots(AT)netvision.net.il
39,560 questions
51,419 answers
573 users
tpl = (1, 2, 3, 4) inverted_tpl = tpl[::-1] print(inverted_tpl) ''' run: (4, 3, 2, 1) '''
tpl = (1, 2, 3, 4) inverted_tpl = tuple(reversed(tpl)) print(inverted_tpl) ''' run: (4, 3, 2, 1) '''