פייתון/פייתון גרסה 3/רשימה: הבדלים בין גרסאות בדף

תוכן שנמחק תוכן שנוסף
Mathreturn (שיחה | תרומות)
Mathreturn (שיחה | תרומות)
שורה 26:
['a', 'b', 'c', 'd', 'e', 'f']
>>> list=['a','b','c','d','e']
#change the letters in the first, second and the third to:
>>> list[0:4]=['e'1,'d'2,'c'3,'b'4]
>>> list
['e'1, 'd'2, 'c'3, 'b'4, 'e']
</source>