Topic was automatically imported from the old Question2Answer platform.
Asked By
potatobanana
guy, how to check all my value in dict?
exmple dict slot:{slot1:null , slot2:null , slot3:null.....}
what i try to do is, if even one value is null i will get true, but if allnot nulli will get false
for i in slot:
if i == null:
print("one or more value is null")
Here by using for loop. Each element in this becomes value of i (here i is a variable) one by one. For the first time i becomes slot1 then slot2 and so on. If any of the element is null then it prints one or more value is null
if it doesn’t print anything then all of these are not null