-2

I want to convert a list of list into list of tuples using Python. But I want to do it without iterating through the nested list as it will increasing execution time of script. Is there any way which can workout for me?

Thanks in Advance

Shatank
  • 31
  • 3
  • 2
    You can avoid writing an explicit loop by using a [list comprehension](https://docs.python.org/2/tutorial/datastructures.html#list-comprehensions) or the [`map` function](https://docs.python.org/2/library/functions.html#map), but it's still essentially going to iterate through all your data. – khelwood Nov 10 '16 at 13:46

1 Answers1

0
converted_list = [tuple(i) for i in nested_list]
anati
  • 264
  • 2
  • 13