Assessments

In the following pages, we will review all of the practice questions from each of the chapters in this book and provide the correct answers.

Chapter 1 – Working with Python Scripting

  1. The Python dictionary data structure provides a hash table that can store any number of Python objects. The dictionary consists of pairs of items containing a key and a value.
  2. By adding a breakpoint. In this way, we can debug and see the content of the variables just at the point where we have established the breakpoint.
  3. BaseException
  4. The dir() method.
  5. OptionParser

Chapter 2 – System Programming Packages

  1. The system (sys) module.
  2. subprocess.call(“cls”, shell=True)
  3. We can use the context manager approach and the with statement.
  4. Processes are full programs. ...

Get Mastering Python for Networking and Security - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.