how to take space separated input in python dictionary code example
Example: how to take space separated input in pyhon dicationary
dic = {}
for index, value in enumerate(input().split()):
dic[int(value)] = int(index)
dic = {}
for index, value in enumerate(input().split()):
dic[int(value)] = int(index)