问题
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
回答1:
converted_list = [tuple(i) for i in nested_list]
来源:https://stackoverflow.com/questions/40529086/python-convert-a-list-of-list-to-list-of-tuples