134. String Maketrans and Partition Method in Python with Example Code || Python String Methods-16

preview_player
Показать описание
Code:
dict={'a':'123','b':'456','c':'789'}
string='abc'

dict={97:'123',98:'456',99:'789'}
string='abc'

#Translational table using two string

firstString='abc'
secondString='def'
string='abc'

#Translational table using removable string

firstString='abc'
secondString='def'
thirdString='abd'
string='abc'

#partition

string='Python is fun'

string="Python is fun, isn't it"

Рекомендации по теме
welcome to shbcf.ru