Report Bug
Qus :

What will be the output of the following Python code?

print('abcdef'.partition('cd'))

Qus

निम्नलिखित Python कोड का आउटपुट क्या होगा?

print('abcdef'.partition('cd'))


A. (‘ab’, ‘ef’)
B. (‘abef’)
C. (‘ab’, ‘cd’, ‘ef’)
D. 2


Solution
C. (‘ab’, ‘cd’, ‘ef’)



Explanation
The string is split into three parts by partition.



Report Bug