Challenge: Add Elements to the List

Can we write code that will add elements at the end of the list?

Problem statement

Given a list, l, add elements at the end of the list in Powershell and Python.

Given data

A list, l given below:


Expected output

Print modified list:


Coding exercise

This problem is designed to check your understanding, so you are encouraged to solve it on your own. If you get completely stuck, then refer to the next lesson that will explain the solution in detail.


Hint: Use the .append function to add an element to the end of the list.

Get hands-on with 1200+ tech skills courses.