Python Test 4 - Strings What will be the output of the following Python statement? "a"+"bc" a abc bc bca What will be the output of the following Python statement? "abcd"[2:] dc cd ab a The output of executing string.ascii_letters can also be achieved by: string.ascii_lowercase+string.ascii_upercase string.letters string.ascii_lowercase_string.digits string.lowercase_string.upercase What will be the output of the following Python code? str1 = 'hello' str2 = ',' str3 = 'world' str1[-1:] o h hello olleh What arithmetic operators cannot be used with strings? * + – All of the mentioned What will be the output of the following Python code? print (r"\nhello") \nhello a new line and hello the letter r and then hello error What will be the output of the following Python statement? print('new' 'line') Error Output equivalent to print ‘new\nline’ new line newline What will be the output of the following Python statement? print('x\97\x98') 9798 x\97 Error \x97\x98 What will be the output of the following Python code? str1="helloworld" str1[::-1] world helloworld hello dlrowolleh print(0xA + 0xB + 0xC): Error 0xA0xB0xC 33 0x22 Schreibe einen Kommentar Antworten abbrechenDu musst angemeldet sein, um einen Kommentar abzugeben.