Multiply Each item of the list to remaining items

前端 未结 0 1499
忘掉有多难
忘掉有多难 2020-12-09 10:57

I have a list

a_list = [1,2,3,4]

code required to solve the problem

new_list = [1, 1*2, 1*3, 2*3, 2*4, 3*4]

I

相关标签:
回答
  • 消灭零回复
提交回复
热议问题