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() দুই প্রান্তের space সরায়, 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.