Python Test 4 - Strings

What will be the output of the following Python statement?

"a"+"bc"

What will be the output of the following Python statement?

"abcd"[2:]

The output of executing string.ascii_letters can also be achieved by:

What will be the output of the following Python code?

 str1 = 'hello'
str2 = ','
str3 = 'world'
str1[-1:]

What arithmetic operators cannot be used with strings?

What will be the output of the following Python code?

print (r"\nhello")

What will be the output of the following Python statement?

print('new' 'line')

What will be the output of the following Python statement?

print('x\97\x98')

What will be the output of the following Python code?

str1="helloworld"
str1[::-1]

print(0xA + 0xB + 0xC):

Schreibe einen Kommentar