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.