Key concept we've to know👇
Don't worry this course might be confusion, however what we learn in this course is very interesting and important! you've to use different resourses, we're on our way to understand, analysis, solve problem, but we must've to consistence 💪
#Adding elements into list
"""we can add elements to a list using the following methods:
append(): add at the end of the list
extend(): adds multiple elements to the end of the list
insert(): adds at a specific position
clear(): removes all items"""
x = []
x.append(15)
x.append(2)
x.append(3)
print("After append:", x)
x.insert(0, 1)
print("After insert", x)
x.extend([4, "list", True])
print("After extend", x)
x.clear()
print("After clear:", x)
Don't worry this course might be confusion, however what we learn in this course is very interesting and important! you've to use different resourses, we're on our way to understand, analysis, solve problem, but we must've to consistence 💪
❤1