What will be the output of the following Python code?
print("xyyzxyzxzxyy".endswith("xyy", 0, 2))
0
1
True
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
none of the mentioned
print("abcdef".find("cd") == "cd" in "abcdef")
Error
None of the mentioned
print("abcdef".find("cd"))
2
3
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’)
print('ab12'.isalnum())
print('ab,12'.isalnum())
None
print('ab'.isalpha())
print('a B'.isalpha())
What will be the output of the following Python code snippet?
print('0xa'.isdigit())
print(''.isdigit())