Question: Assume that you have a find_import_statements () function defind in a module named find_import_statements.py . Write a Python function called assert_no_imports ( code_str ) which


Assume that you have a find_import_statements () function defind in a module named find_import_statements.py . Write a Python function called assert_no_imports ( code_str ) which raises an AssertionError if any import statements were used in the given code string, code_str. Otherwise, your function should do nothing. RUN THE FOLLOWING CODE TO DEFINE AN EXAMPLE CODE STRING! PROVIDE YOUR ANSWER IN THE FOLLOWING CODE CELL
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
