Lesson 26 of 34
String Methods: split, join, replaceString Methods: split, join, replace
9 min 30 XP
split() ஒரு வாக்கியத்தை வார்த்தைகளின் list ஆக்கும். join() ஒரு list-ஐ மீண்டும் ஒரே string ஆக்கும்.
split() turns a sentence into a list of words. join() turns a list back into one string.
Example: edit me and press Run
Press Run to see the result here.strip() இரு பக்க space-களை நீக்கும். replace() ஒரு பகுதியை மாற்றும். find() இடத்தைத் தரும் (இல்லையென்றால் -1). count() எத்தனை முறை என்று எண்ணும்.
strip() removes spaces at both ends, replace() swaps text, find() gives the position (-1 if missing) and count() counts occurrences.
Example: edit me and press Run
Press Run to see the result here.isdigit(), isalpha() போன்றவை ஒரு string என்ன வகை எழுத்துகளால் ஆனது என்று சொல்லும். [::-1] ஒரு string-ஐ தலைகீழாக்கும்.
isdigit() and isalpha() tell you what a string is made of. [::-1] reverses a string.
Example: edit me and press Run
Press Run to see the result here.