Lesson 26 of 34

String Methods: split, join, replace

9 min 30 XP

split() ഒരു വാക്യത്തെ വാക്കുകളുടെ list ആക്കുന്നു. join() list-നെ വീണ്ടും ഒരു string ആക്കുന്നു.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

strip() രണ്ടറ്റത്തെയും spaces നീക്കുന്നു, replace() ടെക്സ്റ്റ് മാറ്റുന്നു, find() സ്ഥാനം നൽകുന്നു (ഇല്ലെങ്കിൽ -1), count() എത്ര തവണ എന്ന് എണ്ണുന്നു.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

isdigit(), isalpha() എന്നിവ string എന്തുകൊണ്ട് നിർമ്മിച്ചതാണെന്ന് പറയുന്നു. [::-1] string തിരിച്ചിടുന്നു.

Example: edit me and press Run

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.

Challenge

+30 XP

input() ഉപയോഗിച്ച് ഒരു വാക്യം വായിക്കൂ. ഓരോ വാക്കിന്റെയും ആദ്യ അക്ഷരം capital ആക്കി വാക്കുകൾ വിപരീത ക്രമത്തിൽ print ചെയ്യൂ. ഉദാഹരണം: "i love python" → "Python Love I"

Output Loading Python (first time takes a few seconds)
Press Run to see the result here.