| | | | Question Answer Tutorial - Python->String | | | | Question: What is the output when following statement is executed?
>>>"a"+"bc" | | Answer: abc
| | | | | | | | Question: What is the output when following statement is executed?
>>>"abcd"[2:] | | Answer: cd
| | | | | | | | Question: The output of executing string.ascii_letters can also be achieved by | | Answer: string.ascii_lowercase+string.ascii_upercase
| | | | | | | | Question: What is the output when following code is executed?
>>> str1 = 'hello' >>> str2 = ',' >>> str3 = 'world' >>> str1[-1:] | | Answer: o
| | | | | | | | Question: What is the output when following code is executed?
>>>print r" hello" | | Answer: hello
| | | | | | | | | | | | |