פייתון/פייתון גרסה 3/רשימה: הבדלים בין גרסאות בדף
תוכן שנמחק תוכן שנוסף
Mathreturn (שיחה | תרומות) |
Mathreturn (שיחה | תרומות) |
||
שורה 7:
<source lang = "python">
#list concatenation
>>> list_1=['a','b','c','d','e',8]▼
>>>
>>> L1+L2
[1, 2, 3, 'a', 'b', 'c']
#list repetition
['a', 'b', 'c', 'd', 'e', 8, 1, 2, 3, 4]▼
>>> L1=[1,2,3]
>>> L1*3
</source>
|