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.

string దేనితో తయారైందో isdigit(), isalpha() చెబుతాయి. [::-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() తో ఒక వాక్యం చదవండి. ప్రతి పదంలో మొదటి అక్షరాన్ని పెద్దదిగా చేసి, పదాలను వెనుక నుండి ముందుకు print చేయండి. ఉదాహరణ: "i love python" → "Python Love I"

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