Starlit Daily

📚 › Python: the friendliest first language

5. Lists

इस लेख का अनुवाद अपने आप होगा। अभी अंग्रेज़ी में दिखाया जा रहा है।

A list holds items in order, inside square brackets. Positions start at 0. len(list) gives the count and append adds an item to the end.

Lists can change, so you can add, remove and replace items.

उदाहरण देखें

fruits = ["mango", "banana"]
fruits.append("jackfruit")
print(fruits[0], len(fruits))

✍️ अब आपकी बारी

Make a list of 3, 8 and 10, then print its length.

← कोर्स पर वापस