+ 6

Explain the answer of this question

Question👇 print('abef'.partition('cd')) Answer👇 ('abef','','')

22nd Apr 2020, 2:08 PM
K.Suhanya
K.Suhanya - avatar
3 Answers
+ 4
The partition() method searches for a specified string, and splits the string into a tuple containing three elements. The first element contains the part before the specified string. The second element contains the specified string. The third element contains the part after the string. As the string 'cd' is not there it returns the same...
22nd Apr 2020, 2:10 PM
sarada lakshmi
sarada lakshmi - avatar
+ 6
Sarada lakshmi... thank you so much. now, I understood 😊
22nd Apr 2020, 2:22 PM
K.Suhanya
K.Suhanya - avatar
+ 1
đŸ˜ŠđŸ€—
22nd Apr 2020, 2:27 PM
sarada lakshmi
sarada lakshmi - avatar