Python Listeleri

Python’a Giriş

Hugo Bowne-Anderson

Data Scientist at DataCamp

Python Veri Tipleri

  • float - gerçek sayılar

  • int - tam sayılar

  • str - metin, dize

  • bool - True, False

height = 1.73
tall = True
  • Her değişken tek bir değeri temsil eder
Python’a Giriş

Sorun

  • Veri Bilimi: çok sayıda veri noktası

  • Tüm ailenin boyları

height1 = 1.73
height2 = 1.68
height3 = 1.71
height4 = 1.89
  • Zahmetli
Python’a Giriş

Python Listesi

  • [a, b, c]
[1.73, 1.68, 1.71, 1.89]
[1.73, 1.68, 1.71, 1.89]
fam = [1.73, 1.68, 1.71, 1.89]
fam
[1.73, 1.68, 1.71, 1.89]
  • Değerler koleksiyonuna ad verin

  • Her türü içerebilir

  • Farklı türler içerebilir

Python’a Giriş

Python Listesi

  • [a, b, c]
fam = ["liz", 1.73, "emma", 1.68, "mom", 1.71, "dad", 1.89]

fam
['liz', 1.73, 'emma', 1.68, 'mom', 1.71, 'dad', 1.89]
fam2 = [["liz", 1.73],
        ["emma", 1.68],
        ["mom", 1.71],
        ["dad", 1.89]]

fam2
[['liz', 1.73], ['emma', 1.68], ['mom', 1.71], ['dad', 1.89]]
Python’a Giriş

Liste türü

type(fam)
list
type(fam2)
list
  • Özel işlevsellik

  • Özel davranış

Python’a Giriş

Haydi pratik yapalım!

Python’a Giriş

Preparing Video For Download...