0

How can I construct pairs between elements of a list with no repetition and no omission?

Say I have a list:

tickers = ['SPY','GLD','OIL'].

How can I form an array of pairs? I want this output:

[('SPY, 'GLD'),('SPY','OIL'), ("GLD','OIL)]
zondo
  • 19,901
  • 8
  • 44
  • 83
Sylvia Chang
  • 29
  • 1
  • 2

0 Answers0