Professional IronPython


Working with Existing Objects



Download 20,35 Mb.
Pdf ko'rish
bet101/453
Sana01.07.2022
Hajmi20,35 Mb.
#723045
1   ...   97   98   99   100   101   102   103   104   ...   453
Working with Existing Objects
 

 
81
to search for the first occurrence of l within a string, you’d type 
MyString.find(‘l‘)
. This 
method returns a value of –1 when the string doesn’t contain the search value.


format(*args[, *kwargs])
: Formats the string using a template (see the “Formatting 
String Output” section for details). The 
args
argument contains positional information and 
kwargs
contains a keyword argument.


index(str sub[, int start[, int end]])
 or
index(str sub, object start, object end)
: Performs precisely the same task as 
find()
. However, instead of returning –1 when a value isn’t found, 
index()
raises a 
ValueError
instead.


isalnum()

isalpha()

isdecimal()

isdigit()

islower()

isnumeric()

isspace()

istitle()

isunicode()
, and 
isupper()
: Detects the state of the string and returns True 
when the specified condition exists. For example, 
isalnum()
returns 
True
when a string con-
tains some combination of letters and numbers. The string must contain at least one letter, 
but need not necessarily contain any numbers. The 
isalpha()
method, on the other hand
only returns 
True
when the string contains only letters, and 
isnumeric()
returns 
True
when 
the string contains only numbers.


join(list sequence)
 or 
join(object sequence)
Appends a string to a list or a sequence. 
This method joins each member of the sequence to the source string. For example, if the source 
string contains ABC and you join 123 to it, you obtain ‘1ABC2ABC3’ as output. To obtain
this output, you’d type 
MyString.join(‘123‘)
. As an alternative, you could type 
MyString 
.join([‘1‘, ‘2‘, ‘3‘])
to obtain the same output using a list.



Download 20,35 Mb.

Do'stlaringiz bilan baham:
1   ...   97   98   99   100   101   102   103   104   ...   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