Question: Problem Write a program that takes a list called my _ list ( it could be a list of any data type ) and prints

Problem
Write a program that takes a list called my_list (it could be a list of any data type) and prints the list three times if the length of the list is less than 5. If the length of my_list is greater than or equal to 5, then print the list one time.
Expected Output
If my_list =['hi', 'hello'] then you will print ['hi', 'hello', 'hi', 'hello', 'hi', 'hello']
If my_list =[65,111,2,81,65,32] then you will print [65,111,2,81,65,32]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!