What is a namespace object?

The documentation for argparse.Namespace can be found here. You can access the s attribute by doing args.s. If you’d like to access this as a dictionary, you can do vars(args), which means you can also do vars(args)[‘s’]

Rolling or sliding window iterator?

There’s one in an old version of the Python docs with itertools examples: The one from the docs is a little more succinct and uses itertools to greater effect I imagine. If your iterator is a simple list/tuple a simple way to slide through it with a specified window size would be: Output: