create account

Kümeler (Sets) #1 - Python Dersleri (Tutorials) by elektroyazilim

View this thread on: hive.blogpeakd.comecency.com
· @elektroyazilim ·
$19.03
Kümeler (Sets) #1 - Python Dersleri (Tutorials)
![yeni.jpg](https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg) 

Merhabalar

Python programlama derslerinin bu bölümünde yeni bir veri türüne başlayacağız. Kümeler ya da İngilizce ismiyle _sets_, bir elemandan sadece bir adet tutan bir veri tipidir. Python'da oldukça önemli bir kullanım alanı vardır.

## Küme oluşturma

Basit bir küme tanımı aşağıdaki yapılır:

![](https://cdn.steemitimages.com/DQmNoHNZQ1zXrmQ9q28EhPVvY48CT2F9PqVaMgSXLEo9XTr/image.png)

Küme tanımı yaparken örneğimizde olduğu gibi süslü parantezler kullanılır. _type()_ fonksiyonu kullanarak a değişkeninin tipini ekrana yazdırmış olduk.

Kümeler kullanım olarak diğer veri tiplerine oldukça benziyor. Örneğin boş bir kümeyi aşağıdaki gibi oluştururuz :

![](https://cdn.steemitimages.com/DQmcYLUs8nVEhsWBFSKtD5Tz6d1JKgqvmFaEushRxQrXSS3/image.png)

Tıpkı listelerdeki _list()_ fonksiyonu gibi kümelerde de _set()_ fonksiyonu bulunur.

_set()_ fonksiyonunu kullanarak herhangi bir veri tipini kümelere dönüştürebiliriz. Aşağıdaki örneğe bakalım :

![](https://cdn.steemitimages.com/DQmQSxhBrmdGeMt6mvZbiz4GMn5EPNKdNEXXfVsRu7sPZSi/image.png)

_myList_ listesi içerisinde tekrarlı elemanlara sahip olan bir liste. _set()_ fonksiyonunu kullanarak bu listeyi kümeye çevirmek istiyoruz.

Ancak kümelerin bir elemandan ancak bir tane alabildiğinden bahsetmiştik. Böyle bir yapı kümeye dönüştüğünde içerisinde tekrarlı yapılar da olsa tek'e düşürülür ve öyle dönüştürülür.

_set()_ fonksiyonunun içerisine benzer şekilde string veri de verebiliriz. Eğer string içerisinde tekrarlı harfler varsa onlardan sadece 1 er tane alacak şekilde bir küme oluşturacaktır. Uygulamasını görelim :

![](https://cdn.steemitimages.com/DQmRb8on6rQ2yDbzXZuNZHqdNBT7pahGHD3JjVvrp7Ack4Y/image.png)

Şimdilik bu kadar.

Umarım faydalı bir çalışma olmuştur.

Teşekkürler.

![yesilayrca.png](https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png)

Kaynak belirtilmeyen görseller bana aittir. The pictures without source in the post is belong to me

<hr><center><sub>Posted via <a href="https://www.marlians.com/">Marlians.com</a></sub></center>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 3 others
properties (23)
authorelektroyazilim
permlinkkuemeler-sets-1-python-dersleri-tutorials
categorypalnet
json_metadata{"tags":["palnet","zzan","stem","tr","programming","python","marlians"],"image":["https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg","https://cdn.steemitimages.com/DQmNoHNZQ1zXrmQ9q28EhPVvY48CT2F9PqVaMgSXLEo9XTr/image.png","https://cdn.steemitimages.com/DQmcYLUs8nVEhsWBFSKtD5Tz6d1JKgqvmFaEushRxQrXSS3/image.png","https://cdn.steemitimages.com/DQmQSxhBrmdGeMt6mvZbiz4GMn5EPNKdNEXXfVsRu7sPZSi/image.png","https://cdn.steemitimages.com/DQmRb8on6rQ2yDbzXZuNZHqdNBT7pahGHD3JjVvrp7Ack4Y/image.png","https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png"],"links":["https://www.marlians.com/"],"app":"marlians/0.1","format":"markdown"}
created2019-08-19 08:26:03
last_update2019-08-19 08:26:03
depth0
children11
last_payout2019-08-26 08:26:03
cashout_time1969-12-31 23:59:59
total_payout_value14.462 HBD
curator_payout_value4.566 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,161
author_reputation73,919,354,200,140
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,694,387
net_rshares56,347,176,381,605
author_curate_reward""
vote details (67)
@bid4joy ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t021606057z
You got a 33.33% upvote from @bid4joy courtesy of @elektroyazilim!
properties (22)
authorbid4joy
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t021606057z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 02:16:06
last_update2019-08-22 02:16:06
depth1
children0
last_payout2019-08-29 02:16:06
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation11,746,524,585,557
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,806,912
net_rshares0
@brupvoter ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t030113678z
You got a 65.82% upvote from @brupvoter courtesy of @elektroyazilim!
properties (22)
authorbrupvoter
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t030113678z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 03:01:12
last_update2019-08-22 03:01:12
depth1
children0
last_payout2019-08-29 03:01:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length69
author_reputation13,657,314,846,422
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,807,927
net_rshares0
@edensgarden ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190823t224246397z
Thanks for using @edensgarden!
properties (22)
authoredensgarden
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190823t224246397z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-23 22:42:45
last_update2019-08-23 22:42:45
depth1
children0
last_payout2019-08-30 22:42:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length31
author_reputation-100,797,867,719
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,880,243
net_rshares0
@joeparys ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t082958103z
You got a 25.00% upvote from @joeparys! Thank you for your support of our services. To continue your support, please follow and delegate Steem power to @joeparys for daily steem and steem dollar payouts!
properties (22)
authorjoeparys
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t082958103z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 08:29:57
last_update2019-08-22 08:29:57
depth1
children0
last_payout2019-08-29 08:29:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length204
author_reputation308,150,391,439,389
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,816,530
net_rshares0
@luckyvotes ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190824t023632861z
You got a 92.80% upvote from @luckyvotes courtesy of @elektroyazilim!
properties (22)
authorluckyvotes
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190824t023632861z
categorypalnet
json_metadata{"app":"postpromoter/2.1.2"}
created2019-08-24 02:36:33
last_update2019-08-24 02:36:33
depth1
children0
last_payout2019-08-31 02:36:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length70
author_reputation29,364,484,293
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,884,702
net_rshares0
@minnowvotes ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t043213436z
You got a 86.44% upvote from @minnowvotes courtesy of @elektroyazilim!
properties (22)
authorminnowvotes
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t043213436z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 04:32:12
last_update2019-08-22 04:32:12
depth1
children0
last_payout2019-08-29 04:32:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length71
author_reputation-125,291,280,752
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,809,607
net_rshares0
@redlambo ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190824t104438555z
You got a 33.33% upvote from @redlambo courtesy of @elektroyazilim! Make sure to use tag #redlambo to be considered for the curation post!
properties (22)
authorredlambo
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190824t104438555z
categorypalnet
json_metadata{"app":"postpromoter/1.9.2"}
created2019-08-24 10:44:39
last_update2019-08-24 10:44:39
depth1
children0
last_payout2019-08-31 10:44:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length139
author_reputation123,143,757,359
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,894,679
net_rshares0
@spydo ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190821t002954211z
You got a 83.17% upvote from @spydo courtesy of @elektroyazilim! We offer 100% Payout and Curation. Thank you.
properties (22)
authorspydo
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190821t002954211z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-21 00:29:54
last_update2019-08-21 00:29:54
depth1
children0
last_payout2019-08-28 00:29:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length111
author_reputation5,236,724,209,210
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,765,781
net_rshares0
@steemitboard ·
Congratulations @elektroyazilim! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

<table><tr><td><img src="https://steemitimages.com/60x70/http://steemitboard.com/@elektroyazilim/voted.png?201908190931"></td><td>You received more than 10000 upvotes. Your next target is to reach 15000 upvotes.</td></tr>
</table>

<sub>_You can view [your badges on your Steem Board](https://steemitboard.com/@elektroyazilim) and compare to others on the [Steem Ranking](https://steemitboard.com/ranking/index.php?name=elektroyazilim)_</sub>
<sub>_If you no longer want to receive notifications, reply to this comment with the word_ `STOP`</sub>



> You can upvote this notification to help all Steem users. Learn how [here](https://steemit.com/steemitboard/@steemitboard/http-i-cubeupload-com-7ciqeo-png)!
properties (22)
authorsteemitboard
permlinksteemitboard-notify-elektroyazilim-20190819t123617000z
categorypalnet
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-08-19 12:36:18
last_update2019-08-19 12:36:18
depth1
children0
last_payout2019-08-26 12:36:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length854
author_reputation38,975,615,169,260
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,701,985
net_rshares0
@steemyoda ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190823t145133579z
The force is with you! You got a 23.75% upvote from @steemyoda courtesy of @elektroyazilim!

http://ultraimg.com/images/2018/02/27/n8qb.gif
properties (22)
authorsteemyoda
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190823t145133579z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-23 14:51:33
last_update2019-08-23 14:51:33
depth1
children0
last_payout2019-08-30 14:51:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length140
author_reputation-1,181,563,121,002
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,866,069
net_rshares0
@whalepromobot ·
re-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t001908212z
You got a 50.00% upvote from @whalepromobot courtesy of @elektroyazilim!
properties (22)
authorwhalepromobot
permlinkre-elektroyazilim-kuemeler-sets-1-python-dersleri-tutorials-20190822t001908212z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-22 00:19:15
last_update2019-08-22 00:19:15
depth1
children0
last_payout2019-08-29 00:19:15
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length73
author_reputation-231,775,391,844
root_title"Kümeler (Sets) #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,804,082
net_rshares0