Contact: aviboots(AT)netvision.net.il
39,866 questions
51,788 answers
573 users
lst = ['python', 'c', 'c++', 'java'] defaultValue = 3 dic = {lst[i]: defaultValue for i in range(0, len(lst), 1)} print(dic) ''' run: {'python': 3, 'c': 3, 'c++': 3, 'java': 3} '''