Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python get all keys in dict having value in range

for key in dict.keys():
    if key >= x-1 and key <= x+1:
        print dict[key]
 
PREVIOUS NEXT
Tagged: #python #keys #dict #range
ADD COMMENT
Topic
Name
9+2 =