Question: Write a recursive function that takes a list and indentation level as input and prints each item in a pretty format. The pretty format should
Write a recursive function that takes a list and indentation level as input and prints each item in a "pretty" format. The "pretty" format should be as follows:
Print an opening square bracket indented indentation level spaces
Print each item in the list on its own line indented indentation level spaces
If the item is a string, print double quotes around itIf the item is another list, pretty print that list increase indentation level by Include a comma after the item unless it is the last item in the list
Print a closing square bracket indented indentation level spaces
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
