Professional IronPython


ljust(int width[, Char fillchar])



Download 20,35 Mb.
Pdf ko'rish
bet102/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   98   99   100   101   102   103   104   105   ...   453
ljust(int width[, Char fillchar])
: Left-justifies the string to a length specified by 
width
by padding the left end with the specified number of characters. You can optionally 
specify a fill character other than the default of a space by providing 
fillchar
. For example, 
if you want to left-justify a string to 40 spaces and fill the spaces with an *, you’d type 
MyString.ljust(40, ‘*‘)
.


lower()
: Returns the lowercase version of the string.


lstrip([str chars])
: Removes white space from the beginning of a string by default. You 
may also provide a 
chars
value as input. In this case, the method removes that character from 
the beginning of the string when it exists. For example, to remove the leading spaces from a 
string, you’d type 
MyString.lstrip()
.


partition(str sep)
: Divides the string into three parts based on the value of 
sep
.
The first part contains the piece of the string before 
sep
, the second part contains 
sep

and the third part contains the piece of the string after 
sep
. For example, to split a string 
at the first space, you’d type 
MyString.partition(‘ ‘)
.


replace(object old, object new[, int maxsplit])
: Replaces the occurrences of 
old
with 
new
in the target string. You may provide an optional number of replacements to make 
by defining 
maxsplit
. For example, if you want to replace the spaces in a string with the 
newline escape code, you’d type 
MyString.replace(‘ ‘, ‘/n‘)
.


rfind()
: Performs the same task as 
find()
, except that this method searches from the right 
end of the string, rather than the left. See the 
find()
entry in the list for details.
548592c05.indd 81
2/24/10 1:21:46 PM
www.finebook.ir



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   98   99   100   101   102   103   104   105   ...   453




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish