Question 1 of 25
Hints left: 3
Q1
What will be the output of the following Python code? print('xyxxyyzxxy'.lstrip('xyy'))
Q2
hat will be the output of the following Python code snippet? print('my_string'.isidentifier())
Q3
What will be the output of the following Python code? print('{0:.2}'.format(1/3))
Q4
What will be the output of the following Python code? print("abcdef".center())
Q5
What will be the output of the following Python code? print("Hello {0} and {1}".format('foo', 'bin'))
Q6
What will be the output of the following Python code? print("xyyzxyzxzxyy".count('yy', 2))
Q7
What will be the output of the following Python code? >>> str1 = 'hello' >>> str2 = ',' >>> str3 = 'world' >>> str1[-1:]
Q8
What will be the output of the following Python code? print(''' \tfoo'''.lstrip())
Q9
What will be the output of the following Python code? print("ab\tcd\tef".expandtabs())
Q10
Which of the following statement prints hello\example\test.txt?
Q11
What will be the output of the following Python code? >>>example = "snow world" >>>example[3] = 's' >>>print example
Q12
What will be the output of the following Python code snippet? print('{:#}'.format(1112223334))
Q13
The format function, when applied on a string returns . . . . . . . .
Q14
What will be the output of the following Python code snippet? print('abc'.islower())
Q15
What will be the output of the following Python code snippet? print('xyyxyyxyxyxxy'.replace('xy', '12', 0))
Q16
To concatenate two strings to a third what statements are applicable?
Q17
If a class defines the __str__(self) method, for an object obj for the class, you can use which command to invoke the __str__ method.
Q18
What will be the output of the following Python statement? >>>print(chr(ord('b')+1))
Q19
What will be the output of the following Python code? print("Hello {0} and {1}".format(('foo', 'bin')))
Q20
What will be the output of the following Python code snippet? print('\t'.isspace())
Q21
What will be the output of the following Python code? print('ab,12'.isalnum())
Q22
What will be the output of the following Python code? print("xyyzxyzxzxyy".count('xyy', 0, 100))
Q23
What will be the output of the following Python code? print("abcdef".center(10, '12'))
Q24
What will be the output of the following Python code? print("abcdef".find("cd") == "cd" in "abcdef")
Q25
What will be the output of the following Python code? print("abc DEF".capitalize())