I want to find the next minimum value of the dictionary i wrote this code but it seems like there is an error with for loop any help ??
nodesdistfromsmartmeter = {'nodeA': 100, 'nodeB': 250, 'nodec': 300, 'nodeD': 50}
min_dist=min(nodesdistfromsmartmeter,key=nodesdistfromsmartmeter.get)
print("smalistdist",min_dist)
seondmin=0
for v in nodesdistfromsmartmeter():
if(v>seondmin and v>min_dist):
seondmin=v
print(seondmin)