What will be the output of the following Python code?
print('abcd'.partition('cd'))
निम्नलिखित पायथन कोड का आउटपुट क्या होगा?
What will be the output of the following Python code snippet?
print('cd'.partition('cd'))
print('abef'.partition('cd'))
print('abcdef12'.replace('cd', '12'))
print('abef'.replace('cd', '12'))
निम्नलिखित Python कोड स्निपेट का आउटपुट क्या होगा?
print('abcefd'.replace('cd', '12'))
print('xyyxyyxyxyxxy'.replace('xy', '12', 100))
print('abcdefcdghcd'.split('cd'))
print('abcdefcdghcd'.split('cd', 0))
print('abcdefcdghcd'.split('cd', -1))
print('abcdefcdghcd'.split('cd', 2))
print('ab\ncd\nef'.splitlines())
print('Ab!2'.swapcase())
print('ab cd ef'.title())
print('ab cd-ef'.title())
print('abcd'.translate('a'.maketrans('abc', 'bcd')))
print('abcd'.translate({'a': '1', 'b': '2', 'c': '3', 'd': '4'}))