137. String Rindex and Split Method in Python with Example Code || Maxsplit Python String Methods-19

Published: 05 October 2022
on channel: Bhavatavi
2
0

Code:
quote='Let it be, let it be, let it be'
result=quote.rindex('let it')
print(result)

#result=quote.rindex('small')
print(result)

quote='Do small things with great love.'
print(quote.rindex('t',2))

print(quote.rindex('th',6,20))

#print(quote.rindex('o small',10,-1))
#split()

text='Love thy neighbor'
print(text.split())

grocery='Milk, Bread, Rice'
print(grocery.split(', '))

print(grocery.split(':'))

grocery='Rice, Wheat, Bread, Milk'
#maxsplit
print(grocery.split(', ',2))


print(grocery.split(', ',1))

print(grocery.split(', ',5))
print(grocery.split(', ',0))


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