{"id":34559,"date":"2025-11-18T21:40:46","date_gmt":"2025-11-18T18:40:46","guid":{"rendered":"https:\/\/fatihsoysal.com\/blog\/?p=34559"},"modified":"2025-11-18T21:40:46","modified_gmt":"2025-11-18T18:40:46","slug":"python-3te-degiskenler-nasil-kullanilir","status":"publish","type":"post","link":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/","title":{"rendered":"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?"},"content":{"rendered":"<p><body><\/p>\n<h2>Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?<\/h2>\n<h3>Giri\u015f: Programlaman\u0131n Temel Ta\u015f\u0131 \u2013 De\u011fi\u015fkenler<\/h3>\n<p>Programlama d\u00fcnyas\u0131nda, veri i\u015fleme ve depolama merkezi bir rol oynar. Bir yaz\u0131l\u0131m\u0131n \u00e7al\u0131\u015fabilmesi i\u00e7in say\u0131lar\u0131, metinleri, listeleri veya daha karma\u015f\u0131k yap\u0131lar\u0131 ge\u00e7ici olarak haf\u0131zada tutmas\u0131 ve bu verilere eri\u015febilmesi gerekir. \u0130\u015fte tam bu noktada &#8220;de\u011fi\u015fkenler&#8221; devreye girer. De\u011fi\u015fkenler, bilgisayar belle\u011finde belirli bir de\u011feri saklamak i\u00e7in kullan\u0131lan adland\u0131r\u0131lm\u0131\u015f depolama alanlar\u0131d\u0131r. Bir nevi, \u00fczerine etiket yap\u0131\u015ft\u0131r\u0131lm\u0131\u015f kutular gibidirler; kutunun i\u00e7indeki i\u00e7erik (de\u011fer) de\u011fi\u015febilir, ancak kutunun ad\u0131 (de\u011fi\u015fkenin ad\u0131) genellikle ayn\u0131 kal\u0131r.<\/p>\n<p>Python, modern, y\u00fcksek seviyeli ve yorumlamal\u0131 bir programlama dili olarak, de\u011fi\u015fken kullan\u0131m\u0131n\u0131 son derece esnek ve sezgisel hale getirmi\u015ftir. Di\u011fer baz\u0131 programlama dillerinin aksine, Python&#8217;da de\u011fi\u015fken tan\u0131mlarken veri tipini \u00f6nceden belirtmenize gerek yoktur. Python&#8217;\u0131n dinamik tipli yap\u0131s\u0131 sayesinde, bir de\u011fi\u015fkene atad\u0131\u011f\u0131n\u0131z de\u011ferin tipi otomatik olarak alg\u0131lan\u0131r. Bu \u00f6zellik, kodu daha h\u0131zl\u0131 yazman\u0131za ve daha okunabilir hale getirmenize olanak tan\u0131r.<\/p>\n<p>Bu makalede, Python 3&#8217;te de\u011fi\u015fkenlerin ne oldu\u011funu, nas\u0131l tan\u0131mland\u0131\u011f\u0131n\u0131, farkl\u0131 veri tipleriyle nas\u0131l kullan\u0131ld\u0131\u011f\u0131n\u0131, de\u011fi\u015fkenlerin bellek y\u00f6netimiyle ili\u015fkisini, kapsamlar\u0131n\u0131 ve iyi kullan\u0131m pratiklerini detayl\u0131 bir \u015fekilde inceleyece\u011fiz. Amac\u0131m\u0131z, Python&#8217;da de\u011fi\u015fkenleri etkili ve do\u011fru bir \u015fekilde kullanman\u0131z i\u00e7in kapsaml\u0131 bir rehber sunmakt\u0131r.<\/p>\n<h3>De\u011fi\u015fken Tan\u0131mlama ve Atama<\/h3>\n<p>Python&#8217;da bir de\u011fi\u015fken tan\u0131mlamak ve ona bir de\u011fer atamak olduk\u00e7a basittir. Temel s\u00f6zdizimi a\u015fa\u011f\u0131daki gibidir:<\/p>\n<pre><code class=\"language-python\">de\u011fi\u015fken_ad\u0131 = de\u011fer<\/code><\/pre>\n<p>Burada <code>de\u011fi\u015fken_ad\u0131<\/code>, de\u011fi\u015fkene verdi\u011finiz isimdir ve <code>de\u011fer<\/code> ise de\u011fi\u015fkende saklamak istedi\u011finiz bilgidir. E\u015fittir (<code>=<\/code>) sembol\u00fc, &#8220;atama operat\u00f6r\u00fc&#8221; olarak bilinir ve sa\u011fdaki de\u011feri soldaki de\u011fi\u015fkene atar.<\/p>\n<p><strong>\u00d6rnekler:<\/strong><\/p>\n<pre><code class=\"language-python\"># Bir tam say\u0131 de\u011feri atama\nyas = 30\n\n<h2>Bir metin (string) de\u011feri atama<\/h2>\nisim = \"Ay\u015fe\"\n\n<h2>Bir ondal\u0131kl\u0131 say\u0131 (float) de\u011feri atama<\/h2>\nboy = 1.75\n\n<h2>Bir boolean (mant\u0131ksal) de\u011fer atama<\/h2>\naktif_kullanici = True\n\n<h2>Bir liste de\u011feri atama<\/h2>\nurunler = [\"Elma\", \"Armut\", \"Muz\"]\n\n<h2>De\u011fi\u015fkenleri ekrana yazd\u0131rma<\/h2>\nprint(yas)\nprint(isim)\nprint(boy)\nprint(aktif_kullanici)\nprint(urunler)<\/code><\/pre>\n<h4>De\u011fi\u015fken Adland\u0131rma Kurallar\u0131 ve \u00d6nerileri<\/h4>\n<p>De\u011fi\u015fkenlere isim verirken belirli kurallara uymak ve genel kabul g\u00f6rm\u00fc\u015f \u00f6nerileri takip etmek \u00f6nemlidir. Bu, kodunuzun ba\u015fkalar\u0131 (ve gelecekteki siz) taraf\u0131ndan daha kolay anla\u015f\u0131lmas\u0131n\u0131 sa\u011flar.<\/p>\n<p>*   <strong>Ge\u00e7erli Karakterler:<\/strong> De\u011fi\u015fken adlar\u0131 harfler (a-z, A-Z), rakamlar (0-9) ve alt \u00e7izgi (_) i\u00e7erebilir.<br \/>\n*   <strong>Ba\u015flang\u0131\u00e7 Karakteri:<\/strong> De\u011fi\u015fken adlar\u0131 bir harf veya alt \u00e7izgi ile ba\u015flamal\u0131d\u0131r. Bir rakamla ba\u015flayamaz.<br \/>\n    *   <code>1sayi = 10<\/code> (Hatal\u0131)<br \/>\n    *   <code>sayi1 = 10<\/code> (Do\u011fru)<br \/>\n    *   <code>_sayi = 10<\/code> (Do\u011fru, ancak genellikle \u00f6zel durumlar i\u00e7in kullan\u0131l\u0131r)<br \/>\n*   <strong>B\u00fcy\u00fck\/K\u00fc\u00e7\u00fck Harf Duyarl\u0131l\u0131\u011f\u0131:<\/strong> Python b\u00fcy\u00fck\/k\u00fc\u00e7\u00fck harf duyarl\u0131d\u0131r. Yani <code>sayi<\/code>, <code>Sayi<\/code> ve <code>SAYI<\/code> \u00fc\u00e7 farkl\u0131 de\u011fi\u015fkeni temsil eder.<br \/>\n*   <strong>Ayr\u0131lm\u0131\u015f Kelimeler (Keywords):<\/strong> Python&#8217;\u0131n kendi i\u00e7inde \u00f6zel anlamlar\u0131 olan ve dilin yap\u0131s\u0131n\u0131 olu\u015fturan kelimeler (\u00f6rne\u011fin <code>if<\/code>, <code>else<\/code>, <code>while<\/code>, <code>for<\/code>, <code>def<\/code>, <code>class<\/code>, <code>import<\/code>, <code>True<\/code>, <code>False<\/code>, <code>None<\/code> vb.) de\u011fi\u015fken ad\u0131 olarak kullan\u0131lamaz.<br \/>\n*   <strong>PEP 8 Kurallar\u0131 (\u00d6neriler):<\/strong> Python kodlama stil rehberi olan PEP 8, de\u011fi\u015fken adlar\u0131 i\u00e7in a\u015fa\u011f\u0131daki \u00f6nerileri sunar:<br \/>\n    *   K\u00fc\u00e7\u00fck harf ve alt \u00e7izgi ile ayr\u0131lm\u0131\u015f kelimeler kullan\u0131n (snake_case). Bu, okunabilirli\u011fi art\u0131r\u0131r.<br \/>\n        *   <code>kullanici_adi = \"Ali\"<\/code> (\u00d6nerilen)<br \/>\n        *   <code>kullaniciAdi = \"Ali\"<\/code> (CamelCase, baz\u0131 dillerde kullan\u0131l\u0131r, Python&#8217;da fonksiyonlar ve de\u011fi\u015fkenler i\u00e7in \u00f6nerilmez)<br \/>\n    *   Sabitler (de\u011feri program boyunca de\u011fi\u015fmeyecek de\u011fi\u015fkenler) i\u00e7in t\u00fcm harfleri b\u00fcy\u00fck ve alt \u00e7izgi ile ayr\u0131lm\u0131\u015f kelimeler kullan\u0131n.<br \/>\n        *   <code>MAX_DENEME_SAYISI = 3<\/code><br \/>\n    *   Anlaml\u0131 isimler se\u00e7in. De\u011fi\u015fkenin ne i\u015fe yarad\u0131\u011f\u0131n\u0131 a\u00e7\u0131k\u00e7a belirten isimler kullan\u0131n. <code>x<\/code> veya <code>temp<\/code> gibi genel isimlerden ka\u00e7\u0131n\u0131n, ancak d\u00f6ng\u00fc saya\u00e7lar\u0131 gibi k\u0131sa \u00f6m\u00fcrl\u00fc de\u011fi\u015fkenler i\u00e7in kabul edilebilir olabilirler.<\/p>\n<h4>\u00c7oklu Atama<\/h4>\n<p>Python, tek bir sat\u0131rda birden fazla de\u011fi\u015fkene de\u011fer atama yetene\u011fi sunar. Bu, kodunuzu daha k\u0131sa ve \u00f6z hale getirebilir.<\/p>\n<p>*   <strong>Ayn\u0131 De\u011feri Birden Fazla De\u011fi\u015fkene Atama:<\/strong><\/p>\n<pre><code class=\"language-python\">x = y = z = 100\n    print(x, y, z) # \u00c7\u0131kt\u0131: 100 100 100<\/code><\/pre>\n<p>*   <strong>Farkl\u0131 De\u011ferleri Birden Fazla De\u011fi\u015fkene Atama:<\/strong><\/p>\n<pre><code class=\"language-python\">ad, soyad, yas = \"Ahmet\", \"Y\u0131lmaz\", 25\n    print(ad)    # \u00c7\u0131kt\u0131: Ahmet\n    print(soyad)  # \u00c7\u0131kt\u0131: Y\u0131lmaz\n    print(yas)   # \u00c7\u0131kt\u0131: 25<\/code><\/pre>\n<p>    Bu y\u00f6ntem, \u00f6zellikle fonksiyonlardan birden fazla de\u011fer d\u00f6nd\u00fc\u011f\u00fcnde veya koleksiyonlar\u0131 a\u00e7arken (unpacking) \u00e7ok kullan\u0131\u015fl\u0131d\u0131r.<\/p>\n<h4>De\u011fi\u015fkenlerin Yeniden Atanmas\u0131 (Reassignment)<\/h4>\n<p>Bir de\u011fi\u015fkene bir kez de\u011fer atad\u0131ktan sonra, program\u0131n ilerleyen a\u015famalar\u0131nda bu de\u011feri de\u011fi\u015ftirebilirsiniz. Python&#8217;\u0131n dinamik tipli yap\u0131s\u0131 sayesinde, yeni atanan de\u011ferin farkl\u0131 bir veri tipinde olmas\u0131 bile m\u00fcmk\u00fcnd\u00fcr.<\/p>\n<pre><code class=\"language-python\">mesaj = \"Merhaba D\u00fcnya\"\nprint(mesaj) # \u00c7\u0131kt\u0131: Merhaba D\u00fcnya\n\nmesaj = \"Python \u00f6\u011freniyorum\" # De\u011feri de\u011fi\u015ftirildi\nprint(mesaj) # \u00c7\u0131kt\u0131: Python \u00f6\u011freniyorum\n\nmesaj = 123 # Tipi de de\u011fi\u015ftirildi (string'den integer'a)\nprint(mesaj) # \u00c7\u0131kt\u0131: 123<\/code><\/pre>\n<h3>De\u011fi\u015fken T\u00fcrleri (Veri Tipleri)<\/h3>\n<p>Python&#8217;da bir de\u011fi\u015fkene atad\u0131\u011f\u0131n\u0131z her de\u011ferin bir tipi vard\u0131r. Python, bu tipleri otomatik olarak alg\u0131lar ve y\u00f6netir. <code>type()<\/code> fonksiyonunu kullanarak bir de\u011fi\u015fkenin veya de\u011ferin tipini \u00f6\u011frenebilirsiniz.<\/p>\n<pre><code class=\"language-python\">sayi = 10\nmetin = \"Python\"\nliste = [1, 2, 3]\n\nprint(type(sayi))  # \u00c7\u0131kt\u0131: <class 'int'>\nprint(type(metin)) # \u00c7\u0131kt\u0131: <class 'str'>\nprint(type(liste)) # \u00c7\u0131kt\u0131: <class 'list'><\/code><\/pre>\n<p>Python&#8217;da en s\u0131k kullan\u0131lan yerle\u015fik veri tiplerini inceleyelim:<\/p>\n<h4>Say\u0131sal Tipler (Numeric Types)<\/h4>\n<p>Say\u0131sal verileri temsil etmek i\u00e7in kullan\u0131l\u0131rlar.<\/p>\n<p>*   <strong><code>int<\/code> (Tam Say\u0131):<\/strong> Pozitif veya negatif tam say\u0131lar\u0131 temsil eder. Python&#8217;daki <code>int<\/code> tipi, belle\u011finizin izin verdi\u011fi \u00f6l\u00e7\u00fcde s\u0131n\u0131rs\u0131z b\u00fcy\u00fckl\u00fckte olabilir.<\/p>\n<pre><code class=\"language-python\">tam_sayi = 12345\n    buyuk_sayi = 12345678901234567890\n    print(type(tam_sayi))\n    print(type(buyuk_sayi))<\/code><\/pre>\n<p>*   <strong><code>float<\/code> (Ondal\u0131kl\u0131 Say\u0131):<\/strong> Ondal\u0131kl\u0131 say\u0131lar\u0131 veya bilimsel g\u00f6sterimdeki say\u0131lar\u0131 temsil eder.<\/p>\n<pre><code class=\"language-python\">ondalikli_sayi = 3.14\n    bilimsel_sayi = 1.2e-5 # 0.000012 anlam\u0131na gelir\n    print(type(ondalikli_sayi))\n    print(type(bilimsel_sayi))<\/code><\/pre>\n<p>*   <strong><code>complex<\/code> (Karma\u015f\u0131k Say\u0131):<\/strong> Ger\u00e7ek ve sanal k\u0131s\u0131mlar\u0131 olan karma\u015f\u0131k say\u0131lar\u0131 temsil eder. <code>j<\/code> veya <code>J<\/code> ile sanal k\u0131s\u0131m belirtilir.<\/p>\n<pre><code class=\"language-python\">karma_sayi = 3 + 4j\n    print(type(karma_sayi))<\/code><\/pre>\n<h4>Metin Tipi (String Type)<\/h4>\n<p>*   <strong><code>str<\/code> (Karakter Dizisi):<\/strong> Metinleri temsil eder. Tek t\u0131rnak (<code>'...'<\/code>), \u00e7ift t\u0131rnak (<code>\"...\"<\/code>) veya \u00fc\u00e7l\u00fc t\u0131rnak (<code>'''...'''<\/code> veya <code>\"\"\"...\"\"\"<\/code>) i\u00e7ine al\u0131narak tan\u0131mlan\u0131r. \u00dc\u00e7l\u00fc t\u0131rnaklar \u00e7ok sat\u0131rl\u0131 metinler i\u00e7in veya belge dizeleri (docstrings) i\u00e7in kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-python\">tek_tirnak = 'Bu bir metindir.'\n    cift_tirnak = \"Bu da bir metindir.\"\n    cok_satirli = \"\"\"Bu\n    \u00e7ok\n    sat\u0131rl\u0131 bir metindir.\"\"\"\n    print(tek_tirnak)\n    print(cok_satirli)\n\n    # String birle\u015ftirme\n    ad = \"Ali\"\n    soyad = \"Can\"\n    tam_ad = ad + \" \" + soyad\n    print(tam_ad)\n\n    # String tekrar\u0131\n    tekrar = \"Merhaba \" * 3\n    print(tekrar) # \u00c7\u0131kt\u0131: Merhaba Merhaba Merhaba<\/code><\/pre>\n<p>    Stringler <strong>de\u011fi\u015fmez (immutable)<\/strong> veri tipleridir; yani bir string olu\u015fturulduktan sonra i\u00e7eri\u011fi de\u011fi\u015ftirilemez. De\u011fi\u015ftirmeye \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131zda asl\u0131nda yeni bir string olu\u015fturulur.<\/p>\n<h4>Liste Tipi (List Type)<\/h4>\n<p>*   <strong><code>list<\/code>:<\/strong> S\u0131ral\u0131 ve de\u011fi\u015ftirilebilir (mutable) eleman koleksiyonudur. K\u00f6\u015feli parantezler <code>[]<\/code> aras\u0131na virg\u00fclle ayr\u0131larak tan\u0131mlan\u0131r. Farkl\u0131 veri tiplerindeki elemanlar\u0131 i\u00e7erebilir.<\/p>\n<pre><code class=\"language-python\">sayilar = [1, 2, 3, 4, 5]\n    karisik_liste = [\"Elma\", 10, True, 3.14]\n    print(sayilar[0]) # \u0130lk elemana eri\u015fim (indeks 0'dan ba\u015flar)\n    print(karisik_liste[2]) # \u00c7\u0131kt\u0131: True\n\n    # Eleman ekleme\n    sayilar.append(6)\n    print(sayilar) # \u00c7\u0131kt\u0131: [1, 2, 3, 4, 5, 6]\n\n    # Eleman de\u011fi\u015ftirme\n    sayilar[0] = 100\n    print(sayilar) # \u00c7\u0131kt\u0131: [100, 2, 3, 4, 5, 6]<\/code><\/pre>\n<h4>Tuple Tipi (Tuple Type)<\/h4>\n<p>*   <strong><code>tuple<\/code>:<\/strong> S\u0131ral\u0131 ve de\u011fi\u015ftirilemez (immutable) eleman koleksiyonudur. Parantezler <code>()<\/code> aras\u0131na virg\u00fclle ayr\u0131larak tan\u0131mlan\u0131r. Listelere benzer ancak olu\u015fturulduktan sonra elemanlar\u0131 de\u011fi\u015ftirilemez, eklenemez veya silinemez.<\/p>\n<pre><code class=\"language-python\">koordinatlar = (10, 20)\n    renkler = (\"k\u0131rm\u0131z\u0131\", \"ye\u015fil\", \"mavi\")\n    print(koordinatlar[0]) # \u00c7\u0131kt\u0131: 10\n\n    # koordinatlar[0] = 30 # Hata verir: TypeError: 'tuple' object does not support item assignment<\/code><\/pre>\n<p>    Tuple&#8217;lar, genellikle bir fonksiyonun birden fazla de\u011fer d\u00f6nd\u00fcrmesi veya sabit veri koleksiyonlar\u0131 i\u00e7in kullan\u0131l\u0131r.<\/p>\n<h4>K\u00fcme Tipi (Set Type)<\/h4>\n<p>*   <strong><code>set<\/code>:<\/strong> S\u0131ras\u0131z ve de\u011fi\u015ftirilebilir (mutable) benzersiz eleman koleksiyonudur. S\u00fcsl\u00fc parantezler <code>{}<\/code> aras\u0131na virg\u00fclle ayr\u0131larak tan\u0131mlan\u0131r. Tekrar eden elemanlar\u0131 otomatik olarak kald\u0131r\u0131r.<\/p>\n<pre><code class=\"language-python\">benzersiz_sayilar = {1, 2, 3, 2, 1, 4}\n    print(benzersiz_sayilar) # \u00c7\u0131kt\u0131: {1, 2, 3, 4} (S\u0131ra garanti edilmez)\n\n    # Eleman ekleme\n    benzersiz_sayilar.add(5)\n    print(benzersiz_sayilar)\n\n    # K\u00fcme operasyonlar\u0131\n    set1 = {1, 2, 3}\n    set2 = {3, 4, 5}\n    print(set1.union(set2)) # Birle\u015fim: {1, 2, 3, 4, 5}\n    print(set1.intersection(set2)) # Kesi\u015fim: {3}<\/code><\/pre>\n<h4>S\u00f6zl\u00fck Tipi (Dictionary Type)<\/h4>\n<p>*   <strong><code>dict<\/code>:<\/strong> Anahtar-de\u011fer \u00e7iftlerinden olu\u015fan s\u0131ras\u0131z ve de\u011fi\u015ftirilebilir (mutable) bir koleksiyondur. S\u00fcsl\u00fc parantezler <code>{}<\/code> aras\u0131na anahtar:de\u011fer \u015feklinde tan\u0131mlan\u0131r. Anahtarlar benzersiz olmal\u0131 ve genellikle string veya say\u0131 gibi de\u011fi\u015ftirilemez tiplerden olmal\u0131d\u0131r.<\/p>\n<pre><code class=\"language-python\">kullanici = {\n        \"ad\": \"Deniz\",\n        \"soyad\": \"Kara\",\n        \"yas\": 28,\n        \"aktif\": True\n    }\n    print(kullanici[\"ad\"]) # Anahtar ile de\u011fere eri\u015fim: \u00c7\u0131kt\u0131: Deniz\n\n    # Yeni anahtar-de\u011fer \u00e7ifti ekleme\n    kullanici[\"email\"] = \"deniz.kara@example.com\"\n    print(kullanici)\n\n    # De\u011fer g\u00fcncelleme\n    kullanici[\"yas\"] = 29\n    print(kullanici)<\/code><\/pre>\n<h4>Boolean Tipi (Boolean Type)<\/h4>\n<p>*   <strong><code>bool<\/code>:<\/strong> Sadece iki de\u011feri olabilen mant\u0131ksal bir veri tipidir: <code>True<\/code> veya <code>False<\/code>. Genellikle ko\u015fullu ifadelerde ve mant\u0131ksal operasyonlarda kullan\u0131l\u0131r.<\/p>\n<pre><code class=\"language-python\">dogru = True\n    yanlis = False\n    print(type(dogru)) # \u00c7\u0131kt\u0131: <class 'bool'>\n\n    if dogru:\n        print(\"Bu ifade do\u011fru.\")<\/code><\/pre>\n<h4>None Tipi (None Type)<\/h4>\n<p>*   <strong><code>None<\/code>:<\/strong> Bir de\u011ferin yoklu\u011funu veya bo\u015f oldu\u011funu temsil eden \u00f6zel bir veri tipidir. Di\u011fer dillerdeki <code>null<\/code> veya <code>nil<\/code> kavram\u0131na benzer.<\/p>\n<pre><code class=\"language-python\">bos_deger = None\n    print(bos_deger)\n    print(type(bos_deger)) # \u00c7\u0131kt\u0131: <class 'NoneType'>\n\n    if bos_deger is None:\n        print(\"De\u011fi\u015fkenin de\u011feri yok.\")<\/code><\/pre>\n<h3>De\u011fi\u015fken Kapsam\u0131 (Scope)<\/h3>\n<p>De\u011fi\u015fken kapsam\u0131, bir de\u011fi\u015fkenin program\u0131n hangi b\u00f6lgelerinden eri\u015filebilir oldu\u011funu belirler. Python&#8217;da temel olarak \u00fc\u00e7 ana kapsam d\u00fczeyi vard\u0131r: yerel (local), global ve i\u00e7 i\u00e7e fonksiyonlar\u0131n yerel kapsam\u0131 (enclosing). Python, de\u011fi\u015fken kapsam\u0131n\u0131 LEGB kural\u0131 (Local, Enclosing function locals, Global, Built-in) ile y\u00f6netir.<\/p>\n<h4>Yerel Kapsam (Local Scope)<\/h4>\n<p>Bir fonksiyon veya metod i\u00e7inde tan\u0131mlanan de\u011fi\u015fkenler yerel kapsamdad\u0131r. Bu de\u011fi\u015fkenlere yaln\u0131zca tan\u0131mland\u0131klar\u0131 fonksiyonun i\u00e7inden eri\u015filebilir. Fonksiyon sona erdi\u011finde, yerel de\u011fi\u015fkenler genellikle bellekten silinir.<\/p>\n<pre><code class=\"language-python\">def fonksiyon_ornegi():\n    yerel_degisken = \"Ben yerel bir de\u011fi\u015fkenim\"\n    print(yerel_degisken)\n\nfonksiyon_ornegi()\n<h2>print(yerel_degisken) # Hata verir: NameError: name 'yerel_degisken' is not defined<\/code><\/pre>\n<\/h2>\n<h4>Global Kapsam (Global Scope)<\/h4>\n<p>Bir mod\u00fcl\u00fcn (dosyan\u0131n) en \u00fcst seviyesinde, yani herhangi bir fonksiyonun veya s\u0131n\u0131f\u0131n d\u0131\u015f\u0131nda tan\u0131mlanan de\u011fi\u015fkenler global kapsamdad\u0131r. Bu de\u011fi\u015fkenlere program\u0131n herhangi bir yerinden eri\u015filebilir.<\/p>\n<pre><code class=\"language-python\">global_degisken = \"Ben global bir de\u011fi\u015fkenim\"\n\ndef baska_fonksiyon():\n    print(global_degisken) # Global de\u011fi\u015fkene eri\u015fim\n\nbaska_fonksiyon()\nprint(global_degisken)<\/code><\/pre>\n<h4><code>global<\/code> Anahtar Kelimesi<\/h4>\n<p>Bir fonksiyon i\u00e7inde global bir de\u011fi\u015fkenin de\u011ferini de\u011fi\u015ftirmek isterseniz, o de\u011fi\u015fkeni <code>global<\/code> anahtar kelimesiyle belirtmeniz gerekir. Aksi takdirde, Python fonksiyon i\u00e7inde ayn\u0131 isimde yeni bir yerel de\u011fi\u015fken olu\u015fturur.<\/p>\n<pre><code class=\"language-python\">sayac = 0 # Global de\u011fi\u015fken\n\ndef artir():\n    global sayac # Global sayac de\u011fi\u015fkenini kullanaca\u011f\u0131m\u0131z\u0131 belirtiyoruz\n    sayac += 1\n    print(f\"Fonksiyon i\u00e7i sayac: {sayac}\")\n\nprint(f\"Ba\u015flang\u0131\u00e7 sayac: {sayac}\")\nartir() # Fonksiyon i\u00e7i sayac: 1\nartir() # Fonksiyon i\u00e7i sayac: 2\nprint(f\"Fonksiyon d\u0131\u015f\u0131 sayac: {sayac}\") # Fonksiyon d\u0131\u015f\u0131 sayac: 2<\/code><\/pre>\n<p>E\u011fer <code>global sayac<\/code> kullanmasayd\u0131k:<\/p>\n<pre><code class=\"language-python\">sayac = 0 # Global de\u011fi\u015fken\n\ndef artir_hatali():\n    sayac = 0 # Yeni bir yerel 'sayac' de\u011fi\u015fkeni olu\u015fturulur\n    sayac += 1\n    print(f\"Fonksiyon i\u00e7i sayac: {sayac}\") # Her zaman 1 olur\n\nprint(f\"Ba\u015flang\u0131\u00e7 sayac: {sayac}\") # Ba\u015flang\u0131\u00e7 sayac: 0\nartir_hatali() # Fonksiyon i\u00e7i sayac: 1\nartir_hatali() # Fonksiyon i\u00e7i sayac: 1\nprint(f\"Fonksiyon d\u0131\u015f\u0131 sayac: {sayac}\") # Fonksiyon d\u0131\u015f\u0131 sayac: 0 (Global sayac de\u011fi\u015fmedi)<\/code><\/pre>\n<h4><code>nonlocal<\/code> Anahtar Kelimesi<\/h4>\n<p>\u0130\u00e7 i\u00e7e (nested) fonksiyonlarda, d\u0131\u015ftaki bir fonksiyonun yerel de\u011fi\u015fkenine i\u00e7teki fonksiyondan eri\u015fmek ve onu de\u011fi\u015ftirmek i\u00e7in <code>nonlocal<\/code> anahtar kelimesi kullan\u0131l\u0131r. Bu, global kapsamdaki bir de\u011fi\u015fkeni de\u011fil, hemen d\u0131\u015ftaki fonksiyonun yerel kapsam\u0131ndaki bir de\u011fi\u015fkeni hedefler.<\/p>\n<pre><code class=\"language-python\">def dis_fonksiyon():\n    mesaj = \"Merhaba\" # D\u0131\u015f fonksiyonun yerel de\u011fi\u015fkeni\n\n    def ic_fonksiyon():\n        nonlocal mesaj # D\u0131\u015f fonksiyonun 'mesaj' de\u011fi\u015fkenini kullanaca\u011f\u0131m\u0131z\u0131 belirtiyoruz\n        mesaj = \"D\u00fcnya\"\n        print(f\"\u0130\u00e7 fonksiyon: {mesaj}\")\n\n    ic_fonksiyon()\n    print(f\"D\u0131\u015f fonksiyon: {mesaj}\") # \u00c7\u0131kt\u0131: D\u0131\u015f fonksiyon: D\u00fcnya\n\ndis_fonksiyon()<\/code><\/pre>\n<h3>De\u011fi\u015fkenlerin Bellekte Saklanmas\u0131<\/h3>\n<p>Python&#8217;da de\u011fi\u015fkenler do\u011frudan de\u011ferleri tutmazlar; bunun yerine, bellek adreslerini (referanslar\u0131n\u0131) tutarlar. Bir de\u011fi\u015fken bir de\u011fere atand\u0131\u011f\u0131nda, Python bellekte o de\u011fer i\u00e7in bir nesne olu\u015fturur ve de\u011fi\u015fken o nesneye referans eder.<\/p>\n<p><code>id()<\/code> fonksiyonu, bir nesnenin bellekteki benzersiz kimli\u011fini (adresini) d\u00f6nd\u00fcr\u00fcr.<\/p>\n<pre><code class=\"language-python\">a = 10\nb = 10\nc = 20\n\nprint(id(a))\nprint(id(b))\nprint(id(c))<\/code><\/pre>\n<p>Yukar\u0131daki \u00f6rnekte, <code>a<\/code> ve <code>b<\/code> ayn\u0131 de\u011fere sahip oldu\u011fu i\u00e7in genellikle Python ayn\u0131 bellek nesnesine referans etmelerini sa\u011flar (k\u00fc\u00e7\u00fck tam say\u0131lar ve baz\u0131 stringler i\u00e7in optimizasyon). <code>c<\/code> farkl\u0131 bir de\u011fere sahip oldu\u011fu i\u00e7in farkl\u0131 bir bellek adresine sahip olacakt\u0131r.<\/p>\n<h4>De\u011fi\u015fmez (Immutable) ve De\u011fi\u015febilir (Mutable) Tipler<\/h4>\n<p>Python&#8217;da veri tipleri iki ana kategoriye ayr\u0131l\u0131r:<\/p>\n<p>*   <strong>De\u011fi\u015fmez (Immutable) Tipler:<\/strong> Bir kez olu\u015fturulduktan sonra i\u00e7eri\u011fi de\u011fi\u015ftirilemeyen nesnelerdir. E\u011fer bir immutable de\u011fi\u015fkene yeni bir de\u011fer atarsan\u0131z, asl\u0131nda bellekte yeni bir nesne olu\u015fturulur ve de\u011fi\u015fken bu yeni nesneye referans etmeye ba\u015flar.<br \/>\n    *   \u00d6rnekler: <code>int<\/code>, <code>float<\/code>, <code>str<\/code>, <code>tuple<\/code>, <code>bool<\/code>, <code>NoneType<\/code>.<\/p>\n<pre><code class=\"language-python\">x = 10\n    print(id(x)) # Bellek adresi 1\n\n    x = x + 1 # x'in de\u011feri 11 oldu\n    print(id(x)) # Bellek adresi 2 (Yeni bir int nesnesi olu\u015fturuldu)\n\n    s = \"hello\"\n    print(id(s)) # Bellek adresi 3\n\n    s = s + \" world\" # s'in de\u011feri \"hello world\" oldu\n    print(id(s)) # Bellek adresi 4 (Yeni bir str nesnesi olu\u015fturuldu)<\/code><\/pre>\n<p>*   <strong>De\u011fi\u015febilir (Mutable) Tipler:<\/strong> Bir kez olu\u015fturulduktan sonra i\u00e7eri\u011fi de\u011fi\u015ftirilebilen nesnelerdir. Bir mutable de\u011fi\u015fkenin i\u00e7eri\u011fini de\u011fi\u015ftirdi\u011finizde, de\u011fi\u015fkenin referans etti\u011fi bellek adresi genellikle ayn\u0131 kal\u0131r, sadece o adresteki nesnenin i\u00e7eri\u011fi de\u011fi\u015fir.<br \/>\n    *   \u00d6rnekler: <code>list<\/code>, <code>dict<\/code>, <code>set<\/code>.<\/p>\n<pre><code class=\"language-python\">liste = [1, 2, 3]\n    print(id(liste)) # Bellek adresi 1\n\n    liste.append(4) # Listeye yeni eleman eklendi\n    print(id(liste)) # Bellek adresi hala 1 (Nesnenin i\u00e7eri\u011fi de\u011fi\u015fti)\n    print(liste) # \u00c7\u0131kt\u0131: [1, 2, 3, 4]\n\n    liste2 = liste # liste2, liste ile ayn\u0131 nesneye referans eder\n    liste2.append(5)\n    print(liste) # \u00c7\u0131kt\u0131: [1, 2, 3, 4, 5] (liste de de\u011fi\u015fti!)<\/code><\/pre>\n<p>    Mutable tiplerle \u00e7al\u0131\u015f\u0131rken bu referanslama davran\u0131\u015f\u0131 \u00f6nemlidir. \u00d6zellikle fonksiyonlara mutable nesneler ge\u00e7irdi\u011finizde veya bir listeyi ba\u015fka bir listeye atad\u0131\u011f\u0131n\u0131zda dikkatli olunmal\u0131d\u0131r, \u00e7\u00fcnk\u00fc beklenmedik yan etkilere yol a\u00e7abilir. E\u011fer mutable bir nesnenin kopyas\u0131n\u0131 olu\u015fturmak istiyorsan\u0131z, <code>list.copy()<\/code>, <code>dict.copy()<\/code> veya dilimleme (<code>[:]<\/code>) gibi y\u00f6ntemleri kullanmal\u0131s\u0131n\u0131z.<\/p>\n<h3>Operat\u00f6rler ve De\u011fi\u015fkenler<\/h3>\n<p>De\u011fi\u015fkenler \u00fczerinde \u00e7e\u015fitli i\u015flemler yapmak i\u00e7in operat\u00f6rler kullan\u0131l\u0131r.<\/p>\n<p><em>   <strong>Aritmetik Operat\u00f6rler:<\/strong> <code>+<\/code>, <code>-<\/code>, <code><\/em><\/code>, <code>\/<\/code> (b\u00f6lme, float sonu\u00e7), <code>\/\/<\/code> (tam say\u0131 b\u00f6lme), <code>%<\/code> (mod alma), <code><em><\/em><\/code> (\u00fcss\u00fc).<\/p>\n<pre><code class=\"language-python\">a = 10\n    b = 3\n    print(a + b) # 13\n    print(a \/ b) # 3.333...\n    print(a \/\/ b) # 3\n    print(a % b) # 1\n    print(a <em><\/em> b) # 1000<\/code><\/pre>\n<p><em>   <strong>Atama Operat\u00f6rleri:<\/strong> <code>=<\/code> (atama), <code>+=<\/code>, <code>-=<\/code>, <code><\/em>=<\/code>, <code>\/=<\/code>, <code>%=<\/code>, <code><em><\/em>=<\/code>, <code>\/\/=<\/code> (k\u0131sa yaz\u0131m).<\/p>\n<pre><code class=\"language-python\">x = 5\n    x += 3 # x = x + 3 yani x = 8\n    print(x)<\/code><\/pre>\n<p>*   <strong>Kar\u015f\u0131la\u015ft\u0131rma Operat\u00f6rleri:<\/strong> <code>==<\/code> (e\u015fit mi), <code>!=<\/code> (e\u015fit de\u011fil mi), <code>><\/code> (b\u00fcy\u00fck m\u00fc), <code><<\/code> (k\u00fc\u00e7\u00fck m\u00fc), <code>>=<\/code> (b\u00fcy\u00fck veya e\u015fit mi), <code><=<\/code> (k\u00fc\u00e7\u00fck veya e\u015fit mi). Sonu\u00e7lar\u0131 <code>True<\/code> veya <code>False<\/code> olan boolean de\u011ferlerdir.<\/p>\n<pre><code class=\"language-python\">print(5 == 5) # True\n    print(5 != 10) # True\n    print(10 > 5) # True<\/code><\/pre>\n<p>*   <strong>Mant\u0131ksal Operat\u00f6rler:<\/strong> <code>and<\/code>, <code>or<\/code>, <code>not<\/code>. Boolean de\u011ferler \u00fczerinde mant\u0131ksal i\u015flemler yapar.<\/p>\n<pre><code class=\"language-python\">print(True and False) # False\n    print(True or False)  # True\n    print(not True)       # False<\/code><\/pre>\n<p>*   <strong>Kimlik Operat\u00f6rleri:<\/strong> <code>is<\/code>, <code>is not<\/code>. \u0130ki de\u011fi\u015fkenin ayn\u0131 bellek nesnesine mi referans etti\u011fini kontrol eder (de\u011ferlerinin ayn\u0131 olup olmad\u0131\u011f\u0131n\u0131 de\u011fil).<\/p>\n<pre><code class=\"language-python\">liste1 = [1, 2, 3]\n    liste2 = [1, 2, 3]\n    liste3 = liste1\n\n    print(liste1 == liste2) # True (de\u011ferleri ayn\u0131)\n    print(liste1 is liste2) # False (farkl\u0131 bellek nesneleri)\n    print(liste1 is liste3) # True (ayn\u0131 bellek nesnesi)<\/code><\/pre>\n<p>*   <strong>\u00dcyelik Operat\u00f6rleri:<\/strong> <code>in<\/code>, <code>not in<\/code>. Bir de\u011ferin bir koleksiyon (liste, tuple, string, set, dictionary anahtarlar\u0131) i\u00e7inde olup olmad\u0131\u011f\u0131n\u0131 kontrol eder.<\/p>\n<pre><code class=\"language-python\">meyveler = [\"elma\", \"armut\", \"kiraz\"]\n    print(\"elma\" in meyveler)    # True\n    print(\"muz\" not in meyveler) # True<\/code><\/pre>\n<h3>\u0130yi De\u011fi\u015fken Kullan\u0131m\u0131 Pratikleri<\/h3>\n<p>Temiz ve s\u00fcrd\u00fcr\u00fclebilir kod yazmak i\u00e7in iyi de\u011fi\u015fken kullan\u0131m pratiklerini benimsemek \u00e7ok \u00f6nemlidir.<\/p>\n<p>*   <strong>Anlaml\u0131 \u0130simler Kullan\u0131n:<\/strong> De\u011fi\u015fkenin amac\u0131n\u0131 ve tuttu\u011fu veriyi a\u00e7\u0131k\u00e7a belirten isimler se\u00e7in. <code>x<\/code>, <code>y<\/code>, <code>temp<\/code> gibi genel isimlerden ka\u00e7\u0131n\u0131n, ancak basit d\u00f6ng\u00fc saya\u00e7lar\u0131 (<code>i<\/code>, <code>j<\/code>) gibi k\u0131sa \u00f6m\u00fcrl\u00fc de\u011fi\u015fkenler i\u00e7in kabul edilebilir olabilirler.<br \/>\n    *   K\u00f6t\u00fc: <code>a = 100<\/code><br \/>\n    *   \u0130yi: <code>maksimum_hiz = 100<\/code><br \/>\n*   <strong>PEP 8 Kurallar\u0131na Uyun:<\/strong> Python toplulu\u011funun kabul etti\u011fi adland\u0131rma standartlar\u0131n\u0131 (snake_case) takip edin. Bu, kodunuzun tutarl\u0131 ve okunabilir olmas\u0131n\u0131 sa\u011flar.<br \/>\n*   <strong>Sabitleri B\u00fcy\u00fck Harfle Yaz\u0131n:<\/strong> De\u011feri program boyunca de\u011fi\u015fmeyecek olan sabitler i\u00e7in t\u00fcm harfleri b\u00fcy\u00fck ve kelimeler aras\u0131na alt \u00e7izgi koyarak adland\u0131r\u0131n. Bu, kodunuzu okuyanlara o de\u011ferin bir sabit oldu\u011funu g\u00f6rsel olarak belirtir.<br \/>\n    *   <code>PI = 3.14159<\/code><br \/>\n    *   <code>VERGI_ORANI = 0.18<\/code><br \/>\n*   <strong>Gereksiz De\u011fi\u015fkenlerden Ka\u00e7\u0131n\u0131n:<\/strong> Her zaman bir de\u011fi\u015fkene ihtiya\u00e7 duyup duymad\u0131\u011f\u0131n\u0131z\u0131 d\u00fc\u015f\u00fcn\u00fcn. Bazen bir ifadeyi do\u011frudan kullanmak, ara bir de\u011fi\u015fkene atamaktan daha temiz olabilir.<br \/>\n*   <strong>Kapsam\u0131 Dar Tutun:<\/strong> M\u00fcmk\u00fcn oldu\u011funca de\u011fi\u015fkenleri en dar kapsamda tan\u0131mlay\u0131n (yani yerel de\u011fi\u015fkenleri tercih edin). Global de\u011fi\u015fkenler, kodun beklenmedik yerlerde de\u011fi\u015fmesine neden olabilece\u011fi i\u00e7in hata ay\u0131klamay\u0131 zorla\u015ft\u0131rabilir.<br \/>\n*   <strong>De\u011fi\u015fkeni Tan\u0131mlamadan Kullanmay\u0131n:<\/strong> Python, tan\u0131mlanmam\u0131\u015f bir de\u011fi\u015fkene eri\u015fmeye \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131zda <code>NameError<\/code> hatas\u0131 verir. Her zaman bir de\u011fi\u015fkene de\u011fer atamadan \u00f6nce onu kullanmad\u0131\u011f\u0131n\u0131zdan emin olun.<\/p>\n<h3>Sonu\u00e7<\/h3>\n<p>Python 3'te de\u011fi\u015fkenler, herhangi bir program\u0131n temel yap\u0131 ta\u015flar\u0131d\u0131r. Verileri depolamam\u0131z\u0131, i\u015flememizi ve program ak\u0131\u015f\u0131n\u0131 kontrol etmemizi sa\u011flarlar. Python'\u0131n dinamik tipli yap\u0131s\u0131, de\u011fi\u015fken tan\u0131mlamay\u0131 son derece esnek hale getirirken, mutable ve immutable tipler aras\u0131ndaki fark\u0131 anlamak, bellek y\u00f6netimi ve program davran\u0131\u015f\u0131n\u0131 do\u011fru bir \u015fekilde kavramak i\u00e7in kritik \u00f6neme sahiptir.<\/p>\n<p>Bu makalede ele ald\u0131\u011f\u0131m\u0131z gibi, de\u011fi\u015fken adland\u0131rma kurallar\u0131na uymak, kapsamlar\u0131n\u0131 do\u011fru anlamak ve iyi pratikleri uygulamak, sadece \u00e7al\u0131\u015fan de\u011fil, ayn\u0131 zamanda okunabilir, s\u00fcrd\u00fcr\u00fclebilir ve hata ay\u0131klamas\u0131 kolay kodlar yazman\u0131za yard\u0131mc\u0131 olacakt\u0131r. Python'da ustala\u015fman\u0131n yolu, de\u011fi\u015fkenleri ve onlar\u0131n nas\u0131l \u00e7al\u0131\u015ft\u0131\u011f\u0131n\u0131 derinlemesine anlamaktan ge\u00e7er. Bu bilgilerle, daha karma\u015f\u0131k veri yap\u0131lar\u0131n\u0131 ve algoritmalar\u0131 g\u00fcvenle uygulayabilir, Python yolculu\u011funuzda sa\u011flam bir temel olu\u015fturabilirsiniz.<\/body><\/p>\n","protected":false},"excerpt":{"rendered":"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?\nGiri\u015f: Programlaman\u0131n Temel Ta\u015f\u0131 \u2013 De\u011fi\u015fkenler\nProgramlama d\u00fcnyas\u0131nda, veri i\u015fleme ve depol","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_page_header_type":"","csco_page_load_nextpost":"","csco_page_subscribe_form":"","csco_page_contact_form":"","footnotes":""},"categories":[1403],"tags":[],"class_list":{"0":"post-34559","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-python","7":"cs-entry","8":"cs-video-wrap"},"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.5 (Yoast SEO v25.3.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Python 3&#039;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\" \/>\n<meta property=\"og:locale\" content=\"tr_TR\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Python 3&#039;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?\" \/>\n<meta property=\"og:description\" content=\"Python 3&#039;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? Giri\u015f: Programlaman\u0131n Temel Ta\u015f\u0131 \u2013 De\u011fi\u015fkenler Programlama d\u00fcnyas\u0131nda, veri i\u015fleme ve depol\" \/>\n<meta property=\"og:url\" content=\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\" \/>\n<meta property=\"og:site_name\" content=\"Kodlar\u0131n Gizemli D\u00fcnyas\u0131\" \/>\n<meta property=\"article:published_time\" content=\"2025-11-18T18:40:46+00:00\" \/>\n<meta name=\"author\" content=\"Fatih Soysal\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Yazan:\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fatih Soysal\" \/>\n\t<meta name=\"twitter:label2\" content=\"Tahmini okuma s\u00fcresi\" \/>\n\t<meta name=\"twitter:data2\" content=\"16 dakika\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\"},\"author\":{\"name\":\"Fatih Soysal\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"headline\":\"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?\",\"datePublished\":\"2025-11-18T18:40:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\"},\"wordCount\":2280,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"articleSection\":[\"Python\"],\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#respond\"]}],\"copyrightYear\":\"2025\",\"copyrightHolder\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\",\"name\":\"Python 3'te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131\",\"isPartOf\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\"},\"datePublished\":\"2025-11-18T18:40:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#breadcrumb\"},\"inLanguage\":\"tr\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Anasayfa\",\"item\":\"https:\/\/fatihsoysal.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#website\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/\",\"name\":\"Fatihsoysal.com\",\"description\":\"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim\",\"publisher\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"tr\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1\",\"name\":\"Fatih Soysal\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"tr\",\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"contentUrl\":\"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png\",\"width\":512,\"height\":512,\"caption\":\"Fatih Soysal\"},\"logo\":{\"@id\":\"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.\",\"url\":\"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Python 3'te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/","og_locale":"tr_TR","og_type":"article","og_title":"Python 3'te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?","og_description":"Python 3'te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? Giri\u015f: Programlaman\u0131n Temel Ta\u015f\u0131 \u2013 De\u011fi\u015fkenler Programlama d\u00fcnyas\u0131nda, veri i\u015fleme ve depol","og_url":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/","og_site_name":"Kodlar\u0131n Gizemli D\u00fcnyas\u0131","article_published_time":"2025-11-18T18:40:46+00:00","author":"Fatih Soysal","twitter_card":"summary_large_image","twitter_misc":{"Yazan:":"Fatih Soysal","Tahmini okuma s\u00fcresi":"16 dakika"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#article","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/"},"author":{"name":"Fatih Soysal","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"headline":"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?","datePublished":"2025-11-18T18:40:46+00:00","mainEntityOfPage":{"@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/"},"wordCount":2280,"commentCount":0,"publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"articleSection":["Python"],"inLanguage":"tr","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#respond"]}],"copyrightYear":"2025","copyrightHolder":{"@id":"https:\/\/fatihsoysal.com\/blog\/#organization"}},{"@type":"WebPage","@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/","url":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/","name":"Python 3'te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r? - Kodlar\u0131n Gizemli D\u00fcnyas\u0131","isPartOf":{"@id":"https:\/\/fatihsoysal.com\/blog\/#website"},"datePublished":"2025-11-18T18:40:46+00:00","breadcrumb":{"@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#breadcrumb"},"inLanguage":"tr","potentialAction":[{"@type":"ReadAction","target":["https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/fatihsoysal.com\/blog\/python-3te-degiskenler-nasil-kullanilir\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Anasayfa","item":"https:\/\/fatihsoysal.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Python 3&#8217;te De\u011fi\u015fkenler Nas\u0131l Kullan\u0131l\u0131r?"}]},{"@type":"WebSite","@id":"https:\/\/fatihsoysal.com\/blog\/#website","url":"https:\/\/fatihsoysal.com\/blog\/","name":"Fatihsoysal.com","description":"Blog - Yaz\u0131l\u0131m D\u00fcnyas\u0131 Tecr\u00fcbelerim","publisher":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/fatihsoysal.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"tr"},{"@type":["Person","Organization"],"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/002a254750921dcfd568a99e48240dd1","name":"Fatih Soysal","image":{"@type":"ImageObject","inLanguage":"tr","@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","contentUrl":"https:\/\/fatihsoysal.com\/blog\/wp-content\/uploads\/2024\/04\/cropped-replicate-prediction-3kgg1hgjn5rgp0cf0p5tr0jw7w-1.png","width":512,"height":512,"caption":"Fatih Soysal"},"logo":{"@id":"https:\/\/fatihsoysal.com\/blog\/#\/schema\/person\/image\/"},"description":"Kullan\u0131m ve kodlama m\u00fckemmeliyetini odak alan uygulamalar olu\u015fturma deneyimine sahip, profesyonel olarak 15+ y\u0131l \u00fczeri deneyime sahip bir yaz\u0131l\u0131m m\u00fchendisi.","url":"https:\/\/fatihsoysal.com\/blog\/author\/fatihsoysal\/"}]}},"yoast_meta":{"yoast_wpseo_title":"","yoast_wpseo_metadesc":"","yoast_wpseo_canonical":""},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34559","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/comments?post=34559"}],"version-history":[{"count":1,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34559\/revisions"}],"predecessor-version":[{"id":34560,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/posts\/34559\/revisions\/34560"}],"wp:attachment":[{"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/media?parent=34559"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/categories?post=34559"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/fatihsoysal.com\/blog\/wp-json\/wp\/v2\/tags?post=34559"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}