Forum: Python’a Giriş
  • append

  • Elif Çakmak

    Member
    May 25, 2021 at 7:37 pm

    <font style=”vertical-align: inherit;”><font style=”vertical-align: inherit;”>İki tane ‘course’ ifadesini tek bir append ile ekletebilir miyiz</font></font>

  • Vusal

    Member
    May 25, 2021 at 7:42 pm

    Elif merhaba,

    Eger ki birden fazla datayi listeye eklemek istyiorsan, o zaman .append() fonksiyonunu degil, .extend() fonksiyonunu kullanman daha mantikli olur. Mesela:

    custom_list = [1,2,3]

    custom_list.extend(("course", "course"))

    print(custom_list)

    • This reply was modified 4 months, 3 weeks ago by  Vusal.
Viewing 1 - 2 of 2 replies

Log in to reply.

Original Post
0 of 0 posts June 2018
Now