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.