6What is the output of the following code?print('banana'.count('a'), 'banana'.index('n'))A3 1B2 2C3 2D3 3View AnswerDiscussWorkspaceReportSaveEasy
7What is the output of the following code?print('hello world'.title().swapcase())AHELLO WORLDBHello WorldChello worldDhELLO wORLDView AnswerDiscussWorkspaceReportSaveMedium
8What is the output of the following code?print(f'{3.14159:.2f}', f'{42:05d}')A3.14159 42B3.14 00042CErrorD3.1 42View AnswerDiscussWorkspaceReportSaveEasy
9What is the output of the following code?name, age = 'Asha', 21 print(f'{name} is {age + 1} next year')A{name} is {age + 1} next yearBAsha is 22 next yearCAsha is age + 1 next yearDAsha is 21 next yearView AnswerDiscussWorkspaceReportSaveEasy
10What is the output of the following code?print('a-b-c'.rsplit('-', 1))A['a', 'b-c']B['a', 'b', 'c']C['a-b', 'c']DErrorView AnswerDiscussWorkspaceReportSaveMedium