2

How to construct a list of tuple from a list.

Let a list data_set be

data_set = ['a', 'b', 'c', 'd']

Output I needed is

tuple_set = [('a', 'b'), ('c', 'd')]

I am new to python, a little help 'd be greatly appreciated.

Thanks in advance

Pradeep
  • 116
  • 11

0 Answers0