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.