{"id":24116248,"url":"https://github.com/aib/python-faq-turkish","last_synced_at":"2026-03-04T07:00:59.826Z","repository":{"id":144862586,"uuid":"262046703","full_name":"aib/python-faq-turkish","owner":"aib","description":null,"archived":false,"fork":false,"pushed_at":"2020-05-07T14:40:50.000Z","size":0,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-28T17:58:16.912Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-05-07T12:40:11.000Z","updated_at":"2020-05-07T14:40:52.000Z","dependencies_parsed_at":null,"dependency_job_id":"22c5eb4e-e8d3-4862-93b3-276a5533ad00","html_url":"https://github.com/aib/python-faq-turkish","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aib/python-faq-turkish","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aib%2Fpython-faq-turkish","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aib%2Fpython-faq-turkish/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aib%2Fpython-faq-turkish/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aib%2Fpython-faq-turkish/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aib","download_url":"https://codeload.github.com/aib/python-faq-turkish/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aib%2Fpython-faq-turkish/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30075425,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T05:31:57.858Z","status":"ssl_error","status_checked_at":"2026-03-04T05:31:38.462Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-11T06:15:54.190Z","updated_at":"2026-03-04T07:00:59.811Z","avatar_url":"https://github.com/aib.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"## Döngü içinde değişken nasıl tanımlarım?\n\nBenzer şekilde yaratılan değerlerim var. Bunları bir döngü içinde değişik isimli değişkenlere atamak istiyorum. Örneğin:\n\n```\nfor i in [1, 2, 3, 4, 5]:\n\tkare_i = i * i\n```\n\ngibi bir kod ile `kare_1` `kare_2` gibi değişkenler elde etmek istiyorum. Nasıl yaparım?\n\n### Cevap:\n\nGüçlükle, ve yapılması hiç tavsiye edilmeyen yöntemlerle. Farklı değişkenler yerine, değerlerin hepsini tutan tek bir liste kullanmalısın:\n\n```\nkareler = [] # boş liste\nfor i in [1, 2, 3, 4, 5]:\n\tkareler.append(i * i) # listeye kare ekle\n\n# kare_1 yerine\nprint(kareler[0]) # 1\n\n# kare_2 yerine\nprint(kareler[1]) # 4\n```\n\nListeleri kullanmaya alıştıkça \u003cstrike\u003ehayatının\u003c/strike\u003e bir sürü şeyin kolaylaştığını görebilirsin:\n\n```\nkareler = [i*i for i in [1, 2, 3, 4, 5]]\n```\n\nEğer 0, 1... yerine kendi indislerini kullanmak istiyorsan [sözlüklere][dict] veya [fonksiyonlara][function] bir göz atman lazım.\n\n[dict]: https://python-istihza.yazbel.com/sozlukler.html\n[function]: https://python-istihza.yazbel.com/fonksiyonlar.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faib%2Fpython-faq-turkish","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faib%2Fpython-faq-turkish","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faib%2Fpython-faq-turkish/lists"}