Skip to content

Tag: parameter-passing

Output is an empty file

My code does not throw an error, it simply creates the files, but of which are empty. I tried it from the command line, and it works using the wildcard training_set_pssm/*.pssm path, but I must do it from the IDE because it is not printing the correct output anyway. The input file is a set of checkpoint files…

Pass nested dictionary location as parameter in Python

If I have a nested dictionary I can get a key by indexing like so: Am I able to pass that indexing as a function parameter? Obviously, this is incorrect, I get TypeError: list indices must be integers, not str. How can I do it correctly? Answer You can use reduce (or functools.reduce in python 3), but that wo…