What will be the output of the following Python code?
print("abcdef".center(10, '12'))
12abcdef12
abcdef1212
1212abcdef
error
print("xyyzxyzxzxyy".count('yy'))
2
0
none of the mentioned
print("xyyzxyzxzxyy".count('xyy', 2, 11))
1
print("xyyzxyzxzxyy".count('xyy', -10, -1))
ascii
qwerty
utf-8
utf-16
print("xyyzxyzxzxyy".endswith("xyy"))
True
3
print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
False
print("ab\tcd\tef".expandtabs())
ab cd ef
abcdef
print("ab\tcd\tef".expandtabs(4))
print("ab\tcd\tef".expandtabs('+'))
ab+cd+ef
ab++++++++cd++++++++ef
print("abcdef".find("cd") == "cd" in "abcdef")
Error
None of the mentioned
print("abcdef".find("cd"))
print("ccdcddcd".find("c"))
4
print("Hello {0} and {1}".format('foo', 'bin'))
Hello foo and bin
Hello {0} and {1} foo bin
Hello 0 and 1
print("Hello {1} and {0}".format('bin', 'foo'))
Hello bin and foo
print("Hello {} and {}".format('foo', 'bin'))
Hello {} and {}
Hello and
Hello {name1} and {name2}
print("Hello {name1} and {name2}".format(name1='foo', name2='bin'))
print("Hello {0!r} and {0!s}".format('foo', 'bin'))
Hello foo and foo
Hello ‘foo’ and foo
Hello foo and ‘bin’
print("Hello {0} and {1}".format(('foo', 'bin')))
Hello (‘foo’, ‘bin’) and (‘foo’, ‘bin’)