title: Can I simplify this for loop with a one-line code?
body: <pre><code>my_dict = {'a':'1', 'b':2, 'c':3}
  my_list = ['a','b','d']
              
  for element in my_list:
    if element not in my_dict:
       my_dict[element] =1
  </code></pre>
  <p>Can this for loop be replaced by a one-line code in Python? I can't use dict or list comprehension to do it.</p>