samedi 29 février 2020

If- statement in python

Attached if statement doesn't provide valid info. My code is looking for something and if it is found, then the value 1 is assigned. otherwise value 0 is assigned.

Note: It is looking in array in JSON format.

for y in behavior_calls:
    if y["api"] == "NtUnmapViewOfSection":
           f1 = 1
    else:
           f1 = 0

For all cases the value is zero assigned. Can anyone find the problem?

Aucun commentaire:

Enregistrer un commentaire