Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lyrics = [["First", "and a partride in a pear tree",], ["second", "2 things"], ["Third", "3 things"], ["Fourth", "4 things"], ["Fifth", "5 things"], ["Sixth", "six things"], ["Seven", "7 things"], ["Eigth", "8 things"], ["Nineth", "nine things"], ["tenth", "Ten things"], ["eleventh", "eleven things"], ["Twelveth", "twelve things"]]
- backwards = []
- for i in range(12):
- print("On the", lyrics[i][0], "my true love gave to me, lyrics[i][1])
- backwards.append(lyrics[i][1])
- for each in backwards:
- print (each) #Forgot how i did it in the reverse order but i want this in a more simplified version to learn from.
- for i in range(len(l)):
- print(list(reversed(l[:i+1])))
- my_str = ['A', 'B', 'C']
- for i, val in enumerate(my_str):
- print ' '.join(my_str[i::-1])
- print 'n'.join(' '.join(my_str[i::-1]) for i in range(len(my_str))
- A
- B A
- C B A
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement