List Functions


friends = ["manni", "zac", "lizzi",]

friends.insert(1, "Kelly")
friends.remove("lizzi")
print(friends.index("manni"))
print(friends)
friends2 = friends.copy()
print(friends2)
lucky_numbers = [23, 45, 25]
lucky_numbers.sort()
print(lucky_numbers)
0 ['manni', 'Kelly', 'zac'] ['manni', 'Kelly', 'zac'] [23, 25, 45]

Leave a comment

Log in with itch.io to leave a comment.