Monday, 5 December 2022

Python String Operations - 9

# STRIN LSTRIP & RSTRIP

of all fruits banana is my favorite of all fruits banana is my favorite

Python String Operations - 8

0
-1
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
Cell In [26], line 12
      9 txt = "Hello, welcome to my world."
     11 print(txt.find("q"))
---> 12 print(txt.index("q")) 

ValueError: substring not found


Python String Operations - 7

#STRING FIND

7 -1 8

Python String Operations - 6

True True False

Python String Operations - Encode

#ENCODE

b'My name is St\xc3\xa5le' b'My name is St\\xe5le' b'My name is Stle' b'My name is St\\N{LATIN SMALL LETTER A WITH RING ABOVE}le' b'My name is St?le' b'My name is Ståle'

Python String Operation - 5

#STRING PADDING - CENTER

OOOOOOOBuddyOOOOOOOO 2 1

Python String Operations - 4

 #ESCAPE CHARACTERS

OUTPUT 1 : We are the "Buddies" from the south. OUTPUT 2 : It's alright. OUTPUT 3 : This will insert one \ (backslash). OUTPUT 4 : Hello Buddy! Buddy! 5 : Hello OUTPUT 6 : Hello Buddy! OUTPUT 7 : HelloBuddy!

Kiro - Core Features

What is Kiro Kiro is an innovative AI-powered IDE that revolutionizes software development through intelligent assistance and structured wor...