Python - Elementy listy zmian
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
SAMER SAEID
thislist = ["apple", "banana", "cherry"]
thislist[1] = "blackcurrant"
print(thislist)
#Change the values "banana" and "cherry" with the
#values "blackcurrant" and "watermelon":
thislist = ["apple", "banana", "cherry", "orange", "kiwi", "mango"]
thislist[1:3] = ["blackcurrant", "watermelon"]
print(thislist)
#Output :['apple', 'blackcurrant', 'watermelon', 'orange', 'kiwi', 'mango']