I am new to Python and need help creating one dictionary file using three lists.
example:
list 1 = ["private", "private"]list 2 = ["10.1.1.1", "10.11.11.11"]list3 = [ "sfc", "gfc"]my code:
dict = {}for s in range(len(list1)): dict[list1[s]] = {list2[s]: list3[s]}print(dict)I am getting output as {'private': {'10.1.1.1': 'sfc'}}
but I want output as {'private': {'10.1.1.1': 'sfc'}, {'10.11.11.11': 'gfx'}}
Could somebody help me on how to get in this format?