211). The output of executing string.ascii_letters can also be achieved by:
>>>"abcd"[2:]

[A]string.ascii_lowercase_string.digits
[B]string.ascii_lowercase+string.ascii_uppercase
[C]string.letters
[D]string.lowercase_string.uppercase

Show Answer

213). What arithmetic operators cannot be used with strings?
>>> str1 = 'hello'
>>> str2 = ','
>>> str3 = 'world'
>>> str1[-1:]

[A]+
[B]*
[C]–
[D]All of the mentioned

Show Answer

214). What will be the output of the following Python code?
>>>print (r"\nhello")

[A]a new line and hello
[B]\nhello
[C]the letter r and then hello
[D]error

Show Answer

215). What will be the output of the following Python statement?
>>>print('new' 'line')

[A]Error
[B]Output equivalent to print ‘new\nline’
[C]newline
[D]new line

Show Answer

216). What will be the output of the following Python statement?
>>> print('x\97\x98')

[A]Error
[B] 97 98
[C]x\97
[D]\x97\x98

Show Answer

218). What will be the output of the following Python code?
print(0xA + 0xB + 0xC)

[A]0xA0xB0xC
[B]Error
[C]0x22
[D]33

Show Answer