D522 Python for IT Automation - Set 2 - Part 2
Test your knowledge of technical writing concepts with these practice questions. Each question includes detailed explanations to help you understand the correct answers.
Question 21: Why is passing shell=True to subprocess with untrusted input risky?
Question 22: Which module handles JSON data in Python?
Question 23: Which json function converts a Python object to a JSON string?
Question 24: Which json function parses a JSON string into a Python object?
Question 25: Which module reads and writes CSV files?
Question 26: Which module is used for regular expressions in Python?
Question 27: Which re function searches a string for the first match of a pattern?
Question 28: Which re function checks for a match only at the beginning of a string?
Question 29: Which re function replaces matches of a pattern with a replacement string?
Question 30: Which regular expression metacharacter matches any single character except newline?
Question 31: What does the regex quantifier * mean?
Question 32: What does the regex quantifier + mean?
Question 33: Which module provides date and time functionality?
Question 34: Which function returns the current date and time?
Question 35: Which module lets you pause a script for a number of seconds?
Question 36: Which time function pauses execution for a set number of seconds?
Question 37: Which module finds files matching a pattern using wildcards?
Question 38: Which module is used to log messages from a Python program?
Question 39: Why is logging preferred over print for automation scripts?
Question 40: Which logging level indicates a serious problem?
Don't Want to Study?
Save Time on Studies, Spend More with Family & Friends! Pay-After-you-Pass!
Get Exam Support