Contact: aviboots(AT)netvision.net.il
39,009 questions
50,723 answers
573 users
dic = {5 : 'python', 8: 'java', 12: 'c', 19: 'c++', 18 : 'c#'} filtered_dic = {key:value for (key,value) in dic.items() if key % 2 != 0} print(filtered_dic) ''' run: {5: 'python', 19: 'c++'} '''