• Gündem
  • Alışveriş
  • Finans
  • YaCevapYaCevap
  • Seyahat
  • Video
  • Görsel
  • Ana Sayfa
  • TeknolojiTeknoloji
  • Psikoloji ve İlişkiler
  • Bilim ve Eğitim
  • Yemek
  • Kültür ve Sanat
  • Filmler ve Diziler
  • Ekonomi ve Finans
  • Oyun
  • Spor
  • Güzellik ve Moda
  • Faydalı İpuçları
  • Otomobil
  • Hukuk
  • Seyahat
  • Hayvanlar ve doğa
  • Sağlık
  • Diğer
  • Buradasın
    • YaCevap ›
    • Teknoloji ›

    Sorted() ve sort() farkı nedir?

    • Teknoloji
    • Programlama
    • Python
    • Fonksiyonlar

    Yazeka

    Arama sonuçlarına göre oluşturuldu

    sorted() ve sort() yöntemlerinin farkı, nasıl çalıştıklarında ve dönüş değerlerinde yatmaktadır:
    • sorted() fonksiyonu, bir iterable'ı (liste, tuple, string vb.) sıralayarak yeni bir sıralanmış liste oluşturur ve orijinal listeyi değiştirmez 12.
    • sort() yöntemi, listeyi yerinde sıralar, yani orijinal listede değişiklikleri yapar ve yeni bir liste oluşturmaz 13.
    Diğer farklılıklar:
    • Kullanım alanı: sort() sadece listelerle çalışırken, sorted() çeşitli iterable'larla kullanılabilir 14.
    • Performans: sort() daha hızlıdır ve bellek kullanımını daha verimlidir, özellikle büyük veri kümeleriyle çalışırken 14.
    5 kaynaktan alınan bilgiyle göre:

      Yanıtı değerlendir

      5 kaynak

      1. shiksha.com
        1
      2. freecodecamp.org
        2
      3. codevisionz.com
        3
      4. pythonsimplified.com
        4
      5. victoriacheng15.vercel.app
        5
    • sorted() fonksiyonu hangi iterable'larla çalışır?

    • sorted() ve sort() arasındaki bellek kullanımı farkı nedir?

    • Python'da sıralama yöntemleri nasıl optimize edilir?

    • Daha fazla bilgi

    Konuyla ilgili materyaller

    Python'da sorted nasıl kullanılır?

    Python'da `sorted()` fonksiyonu bir iterable'ın (liste, tuple, string, sözlük vb.) öğelerini sıralayarak yeni bir sıralanmış liste döndürür. Kullanım şekli: ```python sorted(iterable, key=None, reverse=False) ``` Burada: - iterable: Sıralanacak olan sıra. - key: Öğelerin sıralama kriterini belirleyen fonksiyon, varsayılan değer `None`'dir. - reverse: Sıralamanın ters yönde olması için `True` olarak ayarlanırsa, liste büyükten küçüğe doğru sıralanır, varsayılan değer `False`'dır (artan düzen). Örnek kullanım: ```python numbers = [4, 2, 12, 8] sorted_numbers = sorted(numbers) # [2, 4, 8, 12] ```
    • Programlama
    • Python
    • Fonksiyonlar
    • Sıralama
    5 kaynak
  • Yazeka nedir?
Seçili sitelerdeki metinlere göre Yazeka tarafından oluşturulan yanıtlardır. Hatalar içerebilir. Önemli bilgileri kontrol ediniz.
  • © 2025 Yandex
  • Gizlilik politikası
  • Kullanıcı sözleşmesi
  • Hata bildir
  • Şirket hakkında
{"buo90":{"state":{"logoProps":{"url":"https://yandex.com.tr"},"formProps":{"action":"https://yandex.com.tr/search","searchLabel":"Bul"},"services":{"activeItemId":"answers","items":[{"url":"https://yandex.com.tr/gundem","title":"Gündem","id":"agenda"},{"url":"https://yandex.com.tr/shopping","title":"Alışveriş","id":"shopping"},{"url":"https://yandex.com.tr/finance","title":"Finans","id":"finance"},{"url":"https://yandex.com.tr/yacevap","title":"YaCevap","id":"answers"},{"url":"https://yandex.com.tr/travel","title":"Seyahat","id":"travel"},{"url":"https://yandex.com.tr/video/search?text=popüler+videolar","title":"Video","id":"video"},{"url":"https://yandex.com.tr/gorsel","title":"Görsel","id":"images"}]},"userProps":{"loggedIn":false,"ariaLabel":"Menü","plus":false,"birthdayHat":false,"child":false,"isBirthdayUserId":true,"className":"PortalHeader-User"},"userIdProps":{"flag":"skin","lang":"tr","host":"yandex.com.tr","project":"neurolib","queryParams":{"utm_source":"portal-neurolib"},"retpath":"https%3A%2F%2Fyandex.com.tr%2Fyacevap%2Fc%2Fteknoloji%2Fq%2Fsorted-ve-sort-farki-nedir-3349801392%3Flr%3D213%26ncrnd%3D8514","tld":"com.tr"},"suggestProps":{"selectors":{"form":".HeaderForm","input":".HeaderForm-Input","submit":".HeaderForm-Submit","clear":".HeaderForm-Clear","layout":".HeaderForm-InputWrapper"},"suggestUrl":"https://yandex.com.tr/suggest/suggest-ya.cgi?show_experiment=222&show_experiment=224","deleteUrl":"https://yandex.com.tr/suggest-delete-text?srv=web&text_to_delete=","suggestPlaceholder":"Yapay zeka ile bul","platform":"desktop","hideKeyboardOnScroll":false,"additionalFormClasses":["mini-suggest_theme_tile","mini-suggest_overlay_tile","mini-suggest_expanding_yes","mini-suggest_prevent-empty_yes","mini-suggest_type-icon_yes","mini-suggest_personal_yes","mini-suggest_type-icon_yes","mini-suggest_rich_yes","mini-suggest_overlay_dark","mini-suggest_large_yes","mini-suggest_copy-fact_yes","mini-suggest_clipboard_yes","mini-suggest_turboapp_yes","mini-suggest_expanding_yes","mini-suggest_affix_yes","mini-suggest_carousel_yes","mini-suggest_traffic_yes","mini-suggest_re-request_yes","mini-suggest_source_yes","mini-suggest_favicon_yes","mini-suggest_more","mini-suggest_long-fact_yes","mini-suggest_hide-keyboard_yes","mini-suggest_clear-on-submit_yes","mini-suggest_focus-on-change_yes","mini-suggest_short-fact_yes","mini-suggest_app_yes","mini-suggest_grouping_yes","mini-suggest_entity-suggest_yes","mini-suggest_redesigned-navs_yes","mini-suggest_title-multiline_yes","mini-suggest_type-icon-wrapped_yes","mini-suggest_fulltext-highlight_yes","mini-suggest_fulltext-insert_yes","mini-suggest_lines_multi"],"counter":{"service":"neurolib_com_tr_desktop","url":"//yandex.ru/clck/jclck","timeout":300,"params":{"dtype":"stred","pid":"0","cid":"2873"}},"noSubmit":false,"formAction":"https://yandex.com.tr/search","tld":"com.tr","suggestParams":{"srv":"serp_com_tr_desktop","wiz":"TrWth","yu":"7080762051756075387","lr":213,"uil":"tr","fact":1,"v":4,"use_verified":1,"safeclick":1,"skip_clickdaemon_host":1,"rich_nav":1,"verified_nav":1,"rich_phone":1,"use_favicon":1,"nav_favicon":1,"mt_wizard":1,"history":1,"nav_text":1,"maybe_ads":1,"icon":1,"hl":1,"n":10,"portal":1,"platform":"desktop","mob":0,"extend_fw":1,"suggest_entity_desktop":"1","entity_enrichment":"1","entity_max_count":"5"},"disableWebSuggest":false},"context":{"query":"","reqid":"1756075483652831-17854644152648785247-balancer-l7leveler-kubr-yp-sas-36-BAL","lr":"213","aliceDeeplink":"{\"text\":\"\"}"},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w01-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"header"}}}}},"type":"neuro_library","subtype":"header"},"buo91":{"state":{"links":[{"id":"main","url":"/yacevap","title":"Ana Sayfa","target":"_self"},{"id":"technologies","url":"/yacevap/c/teknoloji","title":"Teknoloji","target":"_self"},{"id":"psychology-and-relationships","url":"/yacevap/c/psikoloji-ve-iliskiler","title":"Psikoloji ve İlişkiler","target":"_self"},{"id":"science-and-education","url":"/yacevap/c/bilim-ve-egitim","title":"Bilim ve Eğitim","target":"_self"},{"id":"food","url":"/yacevap/c/yemek","title":"Yemek","target":"_self"},{"id":"culture-and-art","url":"/yacevap/c/kultur-ve-sanat","title":"Kültür ve Sanat","target":"_self"},{"id":"tv-and-films","url":"/yacevap/c/filmler-ve-diziler","title":"Filmler ve Diziler","target":"_self"},{"id":"economics-and-finance","url":"/yacevap/c/ekonomi-ve-finans","title":"Ekonomi ve Finans","target":"_self"},{"id":"games","url":"/yacevap/c/oyun","title":"Oyun","target":"_self"},{"id":"sport","url":"/yacevap/c/spor","title":"Spor","target":"_self"},{"id":"beauty-and-style","url":"/yacevap/c/guzellik-ve-moda","title":"Güzellik ve Moda","target":"_self"},{"id":"useful-tips","url":"/yacevap/c/faydali-ipuclari","title":"Faydalı İpuçları","target":"_self"},{"id":"auto","url":"/yacevap/c/otomobil","title":"Otomobil","target":"_self"},{"id":"law","url":"/yacevap/c/hukuk","title":"Hukuk","target":"_self"},{"id":"travel","url":"/yacevap/c/seyahat","title":"Seyahat","target":"_self"},{"id":"animals-and-nature","url":"/yacevap/c/hayvanlar-ve-doga","title":"Hayvanlar ve doğa","target":"_self"},{"id":"health","url":"/yacevap/c/saglik","title":"Sağlık","target":"_self"},{"id":"other","url":"/yacevap/c/diger","title":"Diğer","target":"_self"}],"activeLinkId":"technologies","title":"Kategoriler","baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w02-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"header-categories"}}}}},"type":"neuro_library","subtype":"header-categories"},"buo92":{"state":{"tld":"com.tr","markdown":"**sorted() ve sort() yöntemlerinin farkı, nasıl çalıştıklarında ve dönüş değerlerinde yatmaktadır:**\n\n- **sorted() fonksiyonu**, bir iterable'ı (liste, tuple, string vb.) sıralayarak yeni bir sıralanmış liste oluşturur ve orijinal listeyi değiştirmez [```1```](https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/)[```2```](https://www.freecodecamp.org/news/python-sort-list-how-to-order-by-descending-or-ascending/).\n- **sort() yöntemi**, listeyi yerinde sıralar, yani orijinal listede değişiklikleri yapar ve yeni bir liste oluşturmaz [```1```](https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/)[```3```](https://codevisionz.com/lessons/python-sorting-lists/).\n\n**Diğer farklılıklar:**\n- **Kullanım alanı**: sort() sadece listelerle çalışırken, sorted() çeşitli iterable'larla kullanılabilir [```1```](https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/)[```4```](https://pythonsimplified.com/difference-between-sort-and-sorted-in-python/).\n- **Performans**: sort() daha hızlıdır ve bellek kullanımını daha verimlidir, özellikle büyük veri kümeleriyle çalışırken [```1```](https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/)[```4```](https://pythonsimplified.com/difference-between-sort-and-sorted-in-python/).","sources":[{"sourceId":1,"url":"https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/","title":"Difference Between Sort() and Sorted() in... - Shiksha Online","shownUrl":"https://www.shiksha.com/online-courses/articles/difference-between-sort-and-sorted-in-python/","rel":"nofollow"},{"sourceId":2,"url":"https://www.freecodecamp.org/news/python-sort-list-how-to-order-by-descending-or-ascending/","title":"Python Sort List – How to Order By Descending or Ascending","shownUrl":"https://www.freecodecamp.org/news/python-sort-list-how-to-order-by-descending-or-ascending/","rel":"nofollow"},{"sourceId":3,"url":"https://codevisionz.com/lessons/python-sorting-lists/","title":"Efficient Sorting in Python: Using Sort() Vs. Sorted()","shownUrl":"https://codevisionz.com/lessons/python-sorting-lists/","rel":"nofollow"},{"sourceId":4,"url":"https://pythonsimplified.com/difference-between-sort-and-sorted-in-python/","title":"Difference Between Sort() and Sorted() in... - Python Simplified","shownUrl":"https://pythonsimplified.com/difference-between-sort-and-sorted-in-python/","rel":"nofollow"},{"sourceId":5,"url":"https://victoriacheng15.vercel.app/blog/python-sorted-vs-sort-usage","title":"Python - Sorted() Vs Sort() Usage","shownUrl":"https://victoriacheng15.vercel.app/blog/python-sorted-vs-sort-usage","rel":"nofollow"}],"isHermione":false,"headerProps":{"header":"Sorted() ve sort() farkı nedir?","homeUrl":"/yacevap","categoryUrl":"/yacevap/c/teknoloji","categoryTitle":"Teknoloji","canUseNativeShare":false,"extralinksItems":[{"variant":"reportFeedback","reportFeedback":{"feature":"YazekaAnswers","title":"Bu yanıtta yanlış olan ne?","checkBoxLabels":[{"value":"Uygunsuz veya aşağılayıcı yanıt"},{"value":"Soruma yanıt verilmedi"},{"value":"Bilgi hataları var"},{"value":"Bilgi yetersiz"},{"value":"Bilgi güncel değil"},{"value":"Görüntüleme hataları"},{"value":"Yanıtta kullanılan kaynaklar güvenilir değil"},{"value":"Bu soru için yanıt gerekmiyor"},{"value":"Diğer"}]}}],"tags":[{"href":"/yacevap/t/teknoloji","text":"Teknoloji"},{"href":"/yacevap/t/programlama","text":"Programlama"},{"href":"/yacevap/t/python","text":"Python"},{"href":"/yacevap/t/fonksiyonlar","text":"Fonksiyonlar"}]},"suggestProps":{"suggestItems":[{"id":0,"text":"sorted() fonksiyonu hangi iterable'larla çalışır?","url":"/search?text=sorted%28%29+fonksiyonu+hangi+iterable%27larla+%C3%A7al%C4%B1%C5%9F%C4%B1r%3F&promo=force_neuro"},{"id":1,"text":"sorted() ve sort() arasındaki bellek kullanımı farkı nedir?","url":"/search?text=sorted%28%29+ve+sort%28%29+bellek+kullan%C4%B1m%C4%B1&promo=force_neuro"},{"id":2,"text":"Python'da sıralama yöntemleri nasıl optimize edilir?","url":"/search?text=Python%27da+s%C4%B1ralama+y%C3%B6ntemleri+nas%C4%B1l+optimize+edilir%3F&promo=force_neuro"},{"id":-1,"url":"/search?text=Sorted%28%29+ve+sort%28%29+fark%C4%B1+nedir%3F&promo=force_neuro","text":"Daha fazla bilgi"}]},"feedbackProps":{"feature":"YazekaAnswers","baseProps":{"metaFields":{"yandexuid":"7080762051756075387","reqid":"1756075483652831-17854644152648785247-balancer-l7leveler-kubr-yp-sas-36-BAL"}},"positiveCheckboxLabels":[{"value":"Yanıtı çok beğendim"},{"value":"Yanıtta gerekli bilgiler var"},{"value":"Kolay anlaşılır"},{"value":"Diğer"}],"negativeCheckboxLabels":[{"value":"Uygunsuz veya aşağılayıcı yanıt"},{"value":"Soruma yanıt verilmedi"},{"value":"Bilgi hataları var"},{"value":"Bilgi yetersiz"},{"value":"Bilgi güncel değil"},{"value":"Görüntüleme hataları"},{"value":"Yanıtta kullanılan kaynaklar güvenilir değil"},{"value":"Bu soru için yanıt gerekmiyor"},{"value":"Diğer"}]},"dialogStoreProps":{"baseUrl":"","baseUrlWs":""},"globalStoreProps":{"imageBackendUrl":"https://yandex.com.tr/images-apphost/image-download?cbird=171","query":"","retina":false,"avatarId":"0","isHermione":false,"isMacOS":false,"tld":"com.tr","isEmbeddedFuturis":false,"isLoggedIn":false,"brand":"yazeka","reqId":"1756075483652831-17854644152648785247-balancer-l7leveler-kubr-yp-sas-36-BAL","device":{"isIOS":false,"platform":"desktop"}},"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w03-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"question"}}}}},"type":"neuro_library","subtype":"question"},"buo93":{"state":{"relatedMaterials":[{"favicons":["https://favicon.yandex.net/favicon/v2/https://www.freecodecamp.org/news/python-sort-list-how-to-order-by-descending-or-ascending/?size=16&stub=1","https://favicon.yandex.net/favicon/v2/https://www.learnbyexample.org/python-sorted-function/?size=16&stub=1","https://favicon.yandex.net/favicon/v2/https://pythonguides.com/sort-an-array-in-python/?size=16&stub=1","https://favicon.yandex.net/favicon/v2/https://www.programiz.com/python-programming/methods/built-in/sorted?size=16&stub=1","https://favicon.yandex.net/favicon/v2/https://www.geeksforgeeks.org/python-sorted-function/?size=16&stub=1"],"href":"/yacevap/c/teknoloji/q/python-da-sorted-nasil-kullanilir-3065503511","header":"Python'da sorted nasıl kullanılır?","teaser":"Python'da `sorted()` fonksiyonu bir iterable'ın (liste, tuple, string, sözlük vb.) öğelerini sıralayarak yeni bir sıralanmış liste döndürür. Kullanım şekli: ```python sorted(iterable, key=None, reverse=False) ``` Burada: - iterable: Sıralanacak olan sıra. - key: Öğelerin sıralama kriterini belirleyen fonksiyon, varsayılan değer `None`'dir. - reverse: Sıralamanın ters yönde olması için `True` olarak ayarlanırsa, liste büyükten küçüğe doğru sıralanır, varsayılan değer `False`'dır (artan düzen). Örnek kullanım: ```python numbers = [4, 2, 12, 8] sorted_numbers = sorted(numbers) # [2, 4, 8, 12] ```","tags":[{"href":"/yacevap/t/programlama","text":"Programlama"},{"href":"/yacevap/t/python","text":"Python"},{"href":"/yacevap/t/fonksiyonlar","text":"Fonksiyonlar"},{"href":"/yacevap/t/siralama","text":"Sıralama"}]}],"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w04-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"related"}}}}},"type":"neuro_library","subtype":"related"},"buo94":{"state":{"tld":"com.tr","isIos":false,"isQuestionPage":true,"baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w05-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"ask_question"}}}}},"type":"neuro_library","subtype":"ask_question"},"buo95":{"state":{"generalLinks":[{"id":"privacy-policy","text":"Gizlilik politikası","url":"https://yandex.com.tr/legal/privacy_policy/"},{"id":"terms-of-service","text":"Kullanıcı sözleşmesi","url":"https://yandex.com.tr/legal/tos/"},{"id":"report-error","text":"Hata bildir","url":"https://forms.yandex.com.tr/surveys/13748122.01a6645a1ef15703c9b82a7b6c521932ddc0e3f7/"},{"id":"about-company","text":"Şirket hakkında","url":"https://yandex.com.tr/project/portal/contacts/"}],"copyright":{"url":"https://yandex.com.tr","currentYear":2025},"socialLinks":[{"url":"https://www.tiktok.com/@yandex.turkiye","type":"tiktok","title":"TikTok"},{"url":"https://www.youtube.com/@YandexTurkiye","type":"youtube","title":"Youtube"},{"url":"https://www.facebook.com/YandexComTr","type":"facebook","title":"Facebook"},{"url":"https://www.instagram.com/yandex__turkiye/","type":"instagram","title":"Instagram"},{"url":"https://x.com/yndxturkiye","type":"x","title":"X"}],"categoriesLink":[],"disclaimer":"Seçili sitelerdeki metinlere göre Yazeka tarafından oluşturulan yanıtlardır. Hatalar içerebilir. Önemli bilgileri kontrol ediniz.","baobab":{"parentNode":{"context":{"genInfo":{"prefix":"buo9w06-0-1"},"ui":"desktop","service":"neurolib","fast":{"name":"neuro_library","subtype":"footer"}}}}},"type":"neuro_library","subtype":"footer"}}