Skip to content

Tag: python-3.x

Filter null values from JSON

I receive the following JSON from the MS Graph API: How can I filter the null values using Python (3.9) ? Answer First of all, processing it is easier when it’s been converted to python data structure, such as a dict. The built-in json module can convert a json-string into python objects using json.load…

Comparison of file list with files in folder

I have a list of filenames but in the directory they are named a little different. I wanna print filenames that are not in directory. Example of files: FOO_BAR_524B_023D9B01_2021-157T05-34-31__00001_2021-08-30T124702.130.tgz I cannot get what I’m doing wrong… Answer The problem is that you iterate…