Python String and String Manipulation | Python Programming in Tamil | #11
In this video we are going to answer the following questions
What is String in Python ?
Python String and String Manipulation ?
Python String Operators ?
-----------
Strings
------------
Strings are the array of characters
String is a sequence of Unicode characters that may be a combination of letters, numbers, or special symbols enclosed within single, double or even triple quotes.
In python, strings are immutable, it means, once you defi ne a string, it cannot be changed during execution.
Eg:
‘Welcome to learning Python’
“Welcome to learning Python”
‘‘‘ Welcome to learning Python ’’’
----------------------------------------
STRING MANIPULATION
----------------------------------------
Creating a string
Name = “Sriram”
Accessing characters in a String
0 1 2 3 4 5
s r i r a m
-6 -5 -4 -3 -2 -1
Name[-3] # r
Name[4] # a
---------------------------------
STRING OPERATORS
---------------------------------
Python provides the following operators for string operations. These operators are useful to manipulate string
(i) Concatenation (+)
"welcome" + "Python"
(ii) Append (+ =)
str1 = “Hello ”
str1+="Learn Python"
(iii) Repeating (*)
str = “Hi”
print (str*4) # HiHiHiHi
(iv) String slicing
str1[start:end:difference]
str1[2:8:3]
You can download Python from https://www.python.org/
****************************************************************************
YouTube - / @sriramasubramaniamnagarajan
Connect me @
facebook: https://www.facebook.com/profile.php?...
instagram: / sriramasubramaniam
sololearn: https://www.sololearn.com/Profile/104...
PlayList:
C programming - • C Programming Language
Python Programming - • Python Programming
canva - https://www.canva.com/join/simplified...