-
Notifications
You must be signed in to change notification settings - Fork 0
/
stringmethods.py
20 lines (20 loc) · 957 Bytes
/
stringmethods.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
message="Hello there. My name is Sadık Turan"
#message=message.upper()# tamamı büyük
#message=message.lower() # tamamı küçük
#message=message.title() # tüm ilk harfler büyük
#message=message.capitalize() #ilk harfi büyültür stringin
#message=message.strip() # baştaki boşluğu siler
#message=message.split() #tüm kelimeleri parçalar
#message=message.split('.') #noktalrdan itibaren ayırı
#message='*'.join(message)# birleştiri araya istediğimiz elmemanını girer
#index=message.find("Sadık")#başladığı harfin indeksini söyler
#print(index)
#isfound=message.startswith("H")
#print(isfound)
# isfound=message.endswith("n") #son karkaterin n ile bitip bimtmediğini koıntrol eder
# print(isfound)
# message=message.replace("Sadık","çınar")# bulur değiştiri
# message=message.replace(" ","--")
#message=message.center(100)# 100 krakterlik yer açar ve ortalr
#message=message.center(50,"*")
print(message)