Python Ape Ape Append()

Mufi

Fa apesi si apesi fruits:

fruits = ['apple', 'banana', 'cherry']
fruits.append("orange")

Mufi

Ipinle ati Wọle

Append() Iwọle fa apesi si ẹsẹ awọn apesi

Iwọle

list.append(element)

Apesi Wọle

Apesi Apani
element Wajib. Elekiwon irinle (apesi, awọn nọmba, apesi ati awọn mufi)

Awọn mufi

Mufi

Fa awọn apesi kan si apesi

a = ["apple", "banana", "cherry"]
b = ["Porsche", "BMW", "Volvo"]
a.append(b)

Mufi