-
Notifications
You must be signed in to change notification settings - Fork 243
Print List
Sar Champagne Bielert edited this page Apr 8, 2024
·
6 revisions
Unit 1 Session 2 (Click for link to problem statements)
Understand what the interviewer is asking for by using test cases and questions about the problem.
- Can the list be empty?
- Yes. If so, your program shouldn't print anything.
Plan the solution with appropriate visualizations and pseudocode.
General Idea: Loop through a list and print each element to the console.
def print_list(lst):
for item in lst:
print(item)