Guest User

Untitled

a guest
Dec 20th, 2018
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. def foo(some_list):
  2.     li = []
  3.     for i in range(len(some_list)):
  4.         li.append(some_list[i] * some_list[-i-1])
  5.     return li
  6.  
  7. >>> print(foo([1, 2, 3, 4, 5]))
  8. [5, 8, 9, 8, 5]
Add Comment
Please, Sign In to add comment