This is a premium lesson. You can see the shape of every card — unlock to read them.
Unlock
STRING FUNCTIONS AND METHODS IN PYTHON Python-ல் String data-ஐ process செய்ய, analyze செய்ய, search செய்ய, mo……
Premium
This card is part of the premium lesson.
Unlock
String Function String மீது வ……
Premium
This card is part of the premium lesson.
Unlock
General form
function(string) name = "Pyth……
Premium
This card is part of the premium lesson.
Unlock
இங்கே
ஒரு built-in function. String Method String object-க்கு already available-ஆ……
Premium
This card is part of the premium lesson.
Unlock
இங்கே: upper() String method.…
Premium
This card is part of the premium lesson.
Unlock
Comparison
Function vs method
முதலில் இந்த difference மிகவும் தெளிவாக இரு……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Difference
Important string concept
Python String immutable. அதனால் பெரும்பாலான String methods……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "python" text.upper()…
Premium
This card is part of the premium lesson.
Unlock
ஏன்? upper() original text-ஐ மாற்றவில்லை……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
len() ஒரு String-ல் எத்தனை ch……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
P y t h o n Total: 6 characte……
Premium
This card is part of the premium lesson.
Unlock
Space கூட ஒரு character.…
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Calculation
Premium
This card is part of the premium lesson.
Unlock
str() ஒரு value-ஐ String repr……
Premium
This card is part of the premium lesson.
Unlock
Syntax
Premium
This card is part of the premium lesson.
Unlock
Example
x முதலில் Integer. str(x) பிற……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
type() variable அல்லது object……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ல் உள்ள characters-ல் Unicod……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
இதற்கு alphabetical order மட்டும் காரணம் என்று நினைக……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ல் minimum character-ஐ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String characters-ஐ sorted or……
Premium
This card is part of the premium lesson.
Unlock
sorted() String return செய்யா……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
ஒரு character-ன் Unicode code……
Premium
This card is part of the premium lesson.
Unlock
Example
Example
Premium
This card is part of the premium lesson.
Unlock
ord()-க்கு opposite. Unicode numb……
Premium
This card is part of the premium lesson.
Unlock
Example
Example
Comparison
Ord vs chr
Example
String methods-ஐ category-wise படித்தால் எளிதாக நினைவில் இருக்கும். Major categories: Case conversion methods……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String characters அனைத்தையும் ……
Premium
This card is part of the premium lesson.
Unlock
Syntax
string.upper() text = "python"…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String characters அனைத்தையும்……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ன் முதல் character-ஐ upperca……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "python PROGRAMMING"…
Premium
This card is part of the premium lesson.
Unlock
capitalize() எல்லா words-ன் first letter-ஐ uppercase ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
ஒவ்வொரு word-ன் beginning cha……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "python programming la……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Uppercase-ஐ lowercase ஆகவும்,……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
casefold() aggressive lowercase c……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Simple English strings-ல் lower() மற்றும் casefold() si……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Case methods comparison
Comparison
Premium
This card is part of the premium lesson.
Unlock
Comparison
String-ல் ஒரு substring எங்கு fir……
Premium
This card is part of the premium lesson.
Unlock
Syntax
string.find(value) text = "Py……
Premium
This card is part of the premium lesson.
Unlock
Find with substring
text = "Python Programming" p……
Premium
This card is part of the premium lesson.
Unlock
When value not found
text = "Python" print(text.fi……
Premium
This card is part of the premium lesson.
Unlock
Very important: find() substring க……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
index() மற்றும் find() simila……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Comparison
Find vs index
Main difference: Substring not found என்ற……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
But
Error
ValueError: substring not fou……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
rfind() right side-லிருந்து search co……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Index: b a n a n a 0 1 2 3 4 ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Last occurrence index return ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
ஒரு substring எத்தனை முறை occ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Count important
text = "aaaa" print(text.coun……
Premium
This card is part of the premium lesson.
Unlock
இந்த methods mostly Boolean v……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ல் alphabetic characte……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Digits மட்டும் உள்ளதா என்று c……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Alphabet அல்லது Number characters ம……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
But: text = "Python 123"…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Whitespace characters மட்டும்……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ல் உள்ள cased letters ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Cased letters அனைத்தும் upper……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String title case format-ல் இ……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "Python Programming"…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String decimal characters மட்……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Numeric characters உள்ளதா என்……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Comparison
Isdecimal vs isdigit vs isnumeric
Basic ASCII numbers-க்கு: text = "123" இந்த மூன்றும் பொதுவாக: True return செய்யும். Conceptual……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Premium
This card is part of the premium lesson.
Unlock
Comparison
ஒரு String valid Python identi……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
isidentifier() syntax validit……
Premium
This card is part of the premium lesson.
Unlock
Example
for keyword ஆனாலும் identifier lex……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String printable characters ம……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ல் உள்ள characters ASC……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Beginning மற்றும் ending-ல் உ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Middle space remove ஆகாது.…
Premium
This card is part of the premium lesson.
Unlock
Example
text = " Python Programming "…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Left side whitespace remove ச……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Result conceptually: Python R……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Right side whitespace remove ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Strip with characters
strip() spaces மட்டும் அல்ல. Specified ch……
Premium
This card is part of the premium lesson.
Unlock
Important strip concept
strip("abc") exact substring "abc"-ஐ remove செய்யும் என்று நின……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
ஒரு substring-ஐ வேறு substrin……
Premium
This card is part of the premium lesson.
Unlock
Syntax
string.replace(old, new) text……
Premium
This card is part of the premium lesson.
Unlock
Immutability connection
text = "Java" text.replace("J……
Premium
This card is part of the premium lesson.
Unlock
Correct
Replace count
Third argument கொடுக்கலாம். r……
Premium
This card is part of the premium lesson.
Unlock
First two occurrences மட்டும் r……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
ஒரு String-ஐ multiple parts-ஆ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
split() return type: List Str……
Premium
This card is part of the premium lesson.
Unlock
Split with separator
text = "Python,Java,C" print(……
Premium
This card is part of the premium lesson.
Unlock
Comma separator-ஆ use செய்யப்……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Right side-லிருந்து split ope……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Multiple lines-ஐ List of line……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "Python\nJava\nC"…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
ஒரு separator அடிப்படையில் St……
Premium
This card is part of the premium lesson.
Unlock
Syntax
string.partition(separator)…
Premium
This card is part of the premium lesson.
Unlock
Example
partition() Tuple return செய்……
Premium
This card is part of the premium lesson.
Unlock
Result
Premium
This card is part of the premium lesson.
Unlock
Last occurrence separator அடி……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Comparison
Split vs partition
Comparison
CATEGORY 7: JOIN METHOD join() Multi……
Premium
This card is part of the premium lesson.
Unlock
Syntax
separator.join(iterable) இந்த syntax ஆரம்பத்தில் கொஞ……
Premium
This card is part of the premium lesson.
Unlock
Join flow
words = ["Python", "Java", "C……
Premium
This card is part of the premium lesson.
Unlock
Result
Join with comma
words = ["Python", "Java", "C……
Premium
This card is part of the premium lesson.
Unlock
Common error in join
values = [10, 20, 30] print(",".join(values)) Error வரும். ……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String குறிப்பிட்ட text-ஆ sta……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "Python Programming"…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String குறிப்பிட்ட text-ஆ end……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Real-time use: File extension……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ஐ specified width-ல் c……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Conceptual result: Python…
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Left align செய்யும். text = "……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Right align செய்யும். text = ……
Premium
This card is part of the premium lesson.
Unlock
Fill character
text = "Python" print(text.ce……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
String-ன் left side-ல் zeros ……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Useful: 001 002 003 போன்ற fixed-widt……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Specific prefix இருந்தால் அதை……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Prefix இல்லை என்றால் original……
Premium
This card is part of the premium lesson.
Unlock
Premium
This card is part of the premium lesson.
Unlock
Specific suffix இருந்தால் rem……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Comparison
Remove prefix vs lstrip
முக்கிய difference. removeprefix() Exact prefix remove செய்யும். lstrip() c……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Premium
This card is part of the premium lesson.
Unlock
Comparison
Values-ஐ String உள்ளே insert ……
Premium
This card is part of the premium lesson.
Unlock
Example
text = "My name is {} and I a……
Premium
This card is part of the premium lesson.
Unlock
Positional format
text = "{0} learns {1}".forma……
Premium
This card is part of the premium lesson.
Unlock
Named format
text = "{name} learns {course}"……
Premium
This card is part of the premium lesson.
Unlock
F-string
Modern Python-ல் f-string மிக……
Premium
This card is part of the premium lesson.
Unlock
Example
Comparison
Format method vs f-string
Format method: "Name: {}".format(name) F-string: f"Name: {……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Premium
This card is part of the premium lesson.
Unlock
Comparison
Character translation mapping……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Premium
This card is part of the premium lesson.
Unlock
Comparison
Mapping அடிப்படையில் characte……
Premium
This card is part of the premium lesson.
Unlock
Example
Premium
This card is part of the premium lesson.
Unlock
Mapping: a -> 1 b -> 2 c -> 3…
Premium
This card is part of the premium lesson.
Unlock
Encode method
encode() String-ஐ bytes repre……
Premium
This card is part of the premium lesson.
Unlock
Default encoding பொதுவாக UTF-……
Premium
This card is part of the premium lesson.
Unlock
Expandtabs method
Tabs-ஐ spaces-ஆ expand செய்யு……
Premium
This card is part of the premium lesson.
Unlock
Tab stops அடிப்படையில் spacin……
Premium
This card is part of the premium lesson.
Unlock
String methods return types
இது exam-க்கு மிகவும் முக்கிய……
Premium
This card is part of the premium lesson.
Unlock
text = " Python Programming "…
Premium
This card is part of the premium lesson.
Unlock
text.upper() New uppercase String return செய்கிறது. text.lower() New lowercase String return செய்கிறது. text.……
Premium
This card is part of the premium lesson.
Unlock
Real-time example 1: username validation
username = "student369" if usern……
Premium
This card is part of the premium lesson.
Unlock
Real-time example 2: file type
filename = "notes.pdf" if fil……
Premium
This card is part of the premium lesson.
Unlock
Real-time example 3: search
message = "Learn Python Program……
Premium
This card is part of the premium lesson.
Unlock
Note
in என்பது String method அல்ல.……
Premium
This card is part of the premium lesson.
Unlock
Real-time example 4: clean input
User input clean செய்ய strip(……
Premium
This card is part of the premium lesson.
Unlock
Real-time example 5: csv-like data
data = "101,Ravi,Computer Sci……
Premium
This card is part of the premium lesson.
Unlock
Method chaining
String methods ஒன்றன் result மீது இன……
Premium
This card is part of the premium lesson.
Unlock
Flow: Original " python programming "……
Premium
This card is part of the premium lesson.
Unlock
Multiple method chaining
text = " python programming " result =……
Premium
This card is part of the premium lesson.
Unlock
Flow: strip() python programming ……
Premium
This card is part of the premium lesson.
Unlock
Method chaining works because one method returns an object on w……
Premium
This card is part of the premium lesson.
Unlock
Example
text.find("P") returns an Integer. So: text……
Premium
This card is part of the premium lesson.
Unlock
Common error 1
Incorrect: text = "python" text.upper() print(t……
Premium
This card is part of the premium lesson.
Unlock
Common error 2
Incorrect: text = "Python" print(text.find()……
Premium
This card is part of the premium lesson.
Unlock
Common error 3
text = "Python" print(text.in……
Premium
This card is part of the premium lesson.
Unlock
Error
ValueError Safer search where……
Premium
This card is part of the premium lesson.
Unlock
Common error 4
numbers = [1, 2, 3] "-".join(……
Premium
This card is part of the premium lesson.
Unlock
Error.
Because items must be strings. Corr……
Premium
This card is part of the premium lesson.
Unlock
Common error 5
Confusing: split() and: join()…
Premium
This card is part of the premium lesson.
Unlock
split One String to many part……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Comparison: split vs join
Split: text = "A B C" print(t……
Premium
This card is part of the premium lesson.
Unlock
Join: data = ['A', 'B', 'C']…
Premium
This card is part of the premium lesson.
Unlock
Memory: String -> List split(……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Comparison: find vs count
Meaning
First occurrence location. co……
Premium
This card is part of the premium lesson.
Unlock
Meaning
Premium
This card is part of the premium lesson.
Unlock
Comparison
Comparison: upper vs isupper
upper() converts. text.upper() returns a String. isupper……
Premium
This card is part of the premium lesson.
Unlock
Comparison
Comparison: alpha, digit, alnum
Given: "Python" isalpha() -> True isdigit() -> False isalnum() -> True Given: "123" isalpha() -> False isdig……
Premium
This card is part of the premium lesson.
Unlock
Case conversion: upper lower capitalize title swapcase Searching: find index rfind rindex cou……
Premium
This card is part of the premium lesson.
Unlock
Important TRB facts: Python String is immutable. len() is a built-in function. upper() is a String method. fi……
Premium
This card is part of the premium lesson.
Unlock
Question
What is the difference between a function and a method in Python? Answer: A function is ca……
Premium
This card is part of the premium lesson.
Unlock
Question
Does replace() modify a String? Answer: No. Strings……
Premium
This card is part of the premium lesson.
Unlock
Question
Difference between find() and index()? Answer: Bot……
Premium
This card is part of the premium lesson.
Unlock
Question
Difference between split() and join()? Answer: split() converts one S……
Premium
This card is part of the premium lesson.
Unlock
What is the output? text = "p……
Premium
This card is part of the premium lesson.
Unlock
Which one is a built-in funct……
Premium
This card is part of the premium lesson.
Unlock
What does find() return when ……
Premium
This card is part of the premium lesson.
Unlock
What happens if index() canno……
Premium
This card is part of the premium lesson.
Unlock
What is the return type of sp……
Premium
This card is part of the premium lesson.
Unlock
What is the output? text = "P……
Premium
This card is part of the premium lesson.
Unlock
Mcq 7
What is the output? text = "Python 123" print(t……
Premium
This card is part of the premium lesson.
Unlock
Mcq 8
What is the output? text = "b……
Premium
This card is part of the premium lesson.
Unlock
Mcq 9
What is the output? text = "P……
Premium
This card is part of the premium lesson.
Unlock
Mcq 10
What is the output? text = "not……
Premium
This card is part of the premium lesson.
Unlock
Which method removes whitespa……
Premium
This card is part of the premium lesson.
Unlock
Which method combines multipl……
Premium
This card is part of the premium lesson.
Unlock
Practice
Given: text = " Python Programming " Find the output: print(text.strip()) print(text.upper()) print(text.lowe……
Premium
This card is part of the premium lesson.
Unlock
Table
Important complete table
String Functions and Methods are used to process String data. Function example: len(text) Method example: tex……
Premium
This card is part of the premium lesson.
Unlock
Short description
String functions and methods are Python operations used to inspect, search, validate, clean, transform, split……
Premium
This card is part of the premium lesson.
Unlock