DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
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
COMMENT
Name
9+2 =
Submit