create account

String Metotları #1 - Python Dersleri (Tutorials) by elektroyazilim

View this thread on: hive.blogpeakd.comecency.com
· @elektroyazilim ·
$13.91
String Metotları #1 - Python Dersleri (Tutorials)
![yeni.jpg](https://cdn.steemitimages.com/DQmVqEHkajCZyuMfc1Nn7AfRj9QwYTddNmLcySkpi48PD1S/yeni.jpg) 

Merhabalar

Python programlama derslerinin bu bölümünde _stringler_ ve onlarla alakalı metotlara başlayacağız.
 
En çok kullanılan string metotlarını tekere teker ele alacağız. Vereceğimiz metotların dışındaki diğer string metotları ve kullanımlarını aşağıdaki linkten öğrenebilirsiniz :

[string metotları](https://www.tutorialspoint.com/python/python_strings.htm)

## upper() ve lower() metotları

Stringler üzerinde en çok kullanılan metotlarından ikisidir. _upper()_  metodu, stringin tüm karakterlerini büyük harfe çevirirken; _lower()_ fonksiyonu stringin tüm karakterlerini küçük harfe çevirir.

Bu iki fonksiyonu direk string değişkenler üzerinde kullanabilirsiniz. Bunun için string değişken ismini yazdıktan sonra nokta operatörü ile fonksiyonları çağırabilirsiniz :

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

Bunun dışında bir stringi herhangi bir değişkene atamadan direk string üzerinde de aynı işlemleri uygulayabilirsiniz :

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

Bu fonksiyonlar özellikle kullanıcı adı alırken ya da herhangi bir form bilgisini çekerken standardizasyonu sağlama için oldukça faydalıdır.

## replace() metodu

_replace()_ metodu normal herhangi bir text editöründe yaptığımız değiştirme işlemini yapmaktadır. İki parametre alır. Birinci parametre metin içerisinde ikincisi ile değiştirir.

Uygulamasını görelim :

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

_Elektroyazılım_  kelimesindeki _"ı"_ harflerini _"i"_ harfi ile değiştirdi.

_replace()_ metodunu bunların dışında boşluk algılatmak için de kullanabilirsiniz. Mesela aşağıdaki örnekte boşluk karakterleri, "-" ile değiştirilmiştir.

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

Bu metodu kullanarak şifre ya da kullanıcı isimlerindeki boşlukları kaldırabiliriz :

![](https://cdn.steemitimages.com/DQmRDtSuRDxz7QiEfa6SonekhZvKDgWg8H2nFQWjdfM54gZ/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>
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorelektroyazilim
permlinkstring-metotlari-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/DQmZmzgt8FLQzdWAoEnxgQCZAbJYKD76mtdXM3bV1GsoNJc/image.png","https://cdn.steemitimages.com/DQmXvcHhZwcB433nxTu5cZQ8LwNda4oWHZVCeSQc9ffNiVh/image.png","https://cdn.steemitimages.com/DQmYk7mmDUneg3mijuJr929eNQmrCNwE4qG5jx1sfsUQt6c/image.png","https://cdn.steemitimages.com/DQme74hQDGCEobjqWJ1dvbm8vg9dEeeEZ91j6GdJKPaAV1f/image.png","https://cdn.steemitimages.com/DQmRDtSuRDxz7QiEfa6SonekhZvKDgWg8H2nFQWjdfM54gZ/image.png","https://cdn.steemitimages.com/DQmYZw2bhUomeivJwQ8CiLaTzXTbJPLd1PsSGdcoEE1DfKP/yesilayrca.png"],"links":["https://www.tutorialspoint.com/python/python_strings.htm"],"app":"marlians/0.1","format":"markdown"}
created2019-08-17 06:26:45
last_update2019-08-17 06:26:45
depth0
children10
last_payout2019-08-24 06:26:45
cashout_time1969-12-31 23:59:59
total_payout_value10.577 HBD
curator_payout_value3.337 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,538
author_reputation73,919,354,200,140
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,622,350
net_rshares41,571,648,789,473
author_curate_reward""
vote details (48)
@bid4joy ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190819t235923176z
You got a 100.00% upvote from @bid4joy courtesy of @elektroyazilim!
properties (22)
authorbid4joy
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190819t235923176z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 23:59:21
last_update2019-08-19 23:59:21
depth1
children0
last_payout2019-08-26 23:59:21
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_length68
author_reputation11,746,524,585,557
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,722,472
net_rshares0
@brupvoter ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t010708901z
You got a 65.71% upvote from @brupvoter courtesy of @elektroyazilim!
properties (22)
authorbrupvoter
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t010708901z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-20 01:07:09
last_update2019-08-20 01:07:09
depth1
children0
last_payout2019-08-27 01:07:09
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"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,724,040
net_rshares0
@edensgarden ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190822t033559319z
Thanks for using @edensgarden!
properties (22)
authoredensgarden
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190822t033559319z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-22 03:36:00
last_update2019-08-22 03:36:00
depth1
children0
last_payout2019-08-29 03:36:00
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"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,808,662
net_rshares0
@luckyvotes ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190822t074143859z
You got a 92.88% upvote from @luckyvotes courtesy of @elektroyazilim!
properties (22)
authorluckyvotes
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190822t074143859z
categorypalnet
json_metadata{"app":"postpromoter/2.1.2"}
created2019-08-22 07:41:45
last_update2019-08-22 07:41:45
depth1
children0
last_payout2019-08-29 07:41: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_length70
author_reputation29,364,484,293
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,814,553
net_rshares0
@minnowvotes ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t051613647z
You got a 94.12% upvote from @minnowvotes courtesy of @elektroyazilim!
properties (22)
authorminnowvotes
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t051613647z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-20 05:16:15
last_update2019-08-20 05:16:15
depth1
children0
last_payout2019-08-27 05:16: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_length71
author_reputation-125,291,280,752
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,729,483
net_rshares0
@redlambo ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t060948083z
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-string-metotlari-1-python-dersleri-tutorials-20190820t060948083z
categorypalnet
json_metadata{"app":"postpromoter/1.9.2"}
created2019-08-20 06:09:48
last_update2019-08-20 06:09:48
depth1
children0
last_payout2019-08-27 06:09:48
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"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,730,631
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/payout.png?201908170948"></td><td>You received more than 4000 as payout for your posts. Your next target is to reach a total payout of 5000</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>


To support your work, I also upvoted your post!


> 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-20190817t104056000z
categorypalnet
json_metadata{"image":["https://steemitboard.com/img/notify.png"]}
created2019-08-17 10:40:54
last_update2019-08-17 10:40:54
depth1
children0
last_payout2019-08-24 10:40: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_length928
author_reputation38,975,615,169,260
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,627,886
net_rshares0
@steemyoda ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t205657067z
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-string-metotlari-1-python-dersleri-tutorials-20190820t205657067z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-20 20:57:00
last_update2019-08-20 20:57:00
depth1
children0
last_payout2019-08-27 20:57:00
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"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,760,926
net_rshares0
@votecenter ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190819t234945593z
This post has received a 16.67% upvote from @votecenter
properties (22)
authorvotecenter
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190819t234945593z
categorypalnet
json_metadata{"app":"postpromoter/2.1.1"}
created2019-08-19 23:49:48
last_update2019-08-19 23:49:48
depth1
children0
last_payout2019-08-26 23:49:48
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_length55
author_reputation-458,729,686,019
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,722,307
net_rshares0
@whalepromobot ·
re-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t002228887z
You got a 50.00% upvote from @whalepromobot courtesy of @elektroyazilim!
properties (22)
authorwhalepromobot
permlinkre-elektroyazilim-string-metotlari-1-python-dersleri-tutorials-20190820t002228887z
categorypalnet
json_metadata{"app":"postpromoter/2.0.0"}
created2019-08-20 00:22:33
last_update2019-08-20 00:22:33
depth1
children0
last_payout2019-08-27 00:22: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_length73
author_reputation-231,775,391,844
root_title"String Metotları #1 - Python Dersleri (Tutorials)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id89,723,024
net_rshares0