Respuesta :
Answer:
def print_nested_list(lst):
for sub_list in lst:
print(*sub_list)
lst = [["Test"], ["Example", "Online"]]
print_nested_list(lst)
Explanation:
Create a function named print_nested_list that takes one parameter, lst
Inside the function, create a for loop that iterates through the lst
Inside the for loop, print each sublist by using print(*sub_list)
(*sub_list allows us to unpack the lst so that we will be able to reach each sublist inside the lst)
Call the function to test with a nested list
The program displays each element in a list of list as a string seperated by a space. The program written in python 3 goes thus :
def print_nested_list(liist):
#initialize a function which takes in a single parameter
for sub_list in liist:
#iterate through each element in the list of list
print(*sub_list, end=' ')
#print each element in the lists with the cursor remaining on the same line.
liist = [["Test"], ["Example", "Online"]]
#samole run of program
print_nested_list(liist)
#display
Learn more : https://brainly.com/question/20533392
