Hello, I would like to know how this code works. I found it on another thread which leonard wrote the solution for this problem.
n = [3, 5, 7] def double_list(x): d_list =  for i in range(0, len(x)): d_list.append(x[i] * 2) return d_list # Don't forget to return your new list! print double_list(n)
Can some please explain this code to me one by one. I wanted to learn more about this list lessons and I am trying my best to understand.