135. String Translate and Rpartition Method in Python with Example Code || Python String Methods-17

Published: 04 October 2022
on channel: Bhavatavi
3
0

Maketrans method:    • 134. String Maketrans and Partition Method...  

Code:
firstString='abc'
secondString='ghi'
thirdString='ab'
string='abcdef'
print(string)
translation=string.maketrans(firstString,secondString,thirdString)
print(string.translate(translation))

translation={97:None,98:None,99:105}
string='abcdef'
print(string.translate(translation))
#rpartition

string='Python is fun'
print(string.rpartition('is '))

print(string.rpartition('not '))

string="Python is fun, isn't it"
print(string.rpartition('is'))


On this page of the site you can watch the video online 135. String Translate and Rpartition Method in Python with Example Code || Python String Methods-17 with a duration of hours minute second in good quality, which was uploaded by the user Bhavatavi 04 October 2022, share the link with friends and acquaintances, this video has already been watched 3 times on youtube and it was liked by 0 viewers. Enjoy your viewing!