I'm learning how to use dictionaries currently and I sort of know how to do dictionary comprehension with for loops. However I want to include an if statement into the for loop. Something similar to this:
Dict = {}
for i in range(11):
if i < 5:
Dict[i] = 1
else:
Dict[i] = 0
How do I turn that mess into dictionary comprehension?