Python List Manipulation

picture of python with python logo in corner

Doing more to your lists with python list manipulation.

Adding to a List

You can add lists together using the plus sign:

list_1 = [‘hello’,’good bye’]

list_2 = [‘world’, ‘friends’]

list_3 = list_1 + list_2

print(list_2)

[‘hello’,’good bye’,’world’, ‘friends’]

Removing items from a List

del(list_2[1]) = [‘world’]