Q.

What will be the output of the following
Python code?
>>> str1 = 'hello'
>>> str2 = ','
>>> str3 = 'world'
>>> str1[-1:]

A. olleh
B. hello
C. h
D. o
Answer» D. o
Explanation: -1 corresponds to the last index.
5.3k
0
Do you find this helpful?
43

Discussion

No comments yet