270). What will be the output of the following Python code?
print("ab\tcd\tef".expandtabs())

[A]ab  cd  ef
[B]abcdef
[C]ab\tcd\tef
[D]ab cd ef

Show Answer

272). What will be the output of the following Python code?
print("ab\tcd\tef".expandtabs('+'))

[A]ab+cd+ef
[B]ab++++++++cd++++++++ef
[C]ab cd ef
[D]none of the mentioned

Show Answer

273). What will be the output of the following Python code?
print("abcdef".find("cd") == "cd" in "abcdef")

[A]True
[B]False
[C]Error
[D]None of the mentioned

Show Answer

274). What will be the output of the following Python code?
print("abcdef".find("cd"))

[A]True
[B]2
[C]3
[D]None of the mentioned

Show Answer

276). What will be the output of the following Python code?
print("Hello {0} and {1}".format('foo', 'bin'))

[A]Hello foo and bin
[B]Hello {0} and {1} foo bin
[C]Error
[D]Hello 0 and 1

Show Answer

277). What will be the output of the following Python code?
print("Hello {1} and {0}".format('bin', 'foo'))

[A]Hello foo and bin
[B]Hello bin and foo
[C]Error
[D]None of the mentioned

Show Answer

278). What will be the output of the following Python code?
print("Hello {} and {}".format('foo', 'bin'))

[A]Hello foo and bin
[B]Hello {} and {}
[C]Error
[D]Hello and

Show Answer

279). What will be the output of the following Python code?
print("Hello {name1} and {name2}".format('foo', 'bin'))

[A]Hello foo and bin
[B]Hello {name1} and {name2}
[C]Error
[D]Hello and

Show Answer