Computer Science
Given a string S = "CARPE DIEM". If n is length/2 (length is the length of the given string), then what would following return?
(a) S[: n]
(b) S[n :]
(c) S[n : n]
(d) S[1 : n]
(e) S[n : length - 1]
Related Questions
Which of the following is not a Python legal string operation?
(a) 'abc' + 'abc'
(b) 'abc' * 3
(c) 'abc' + .3
(d) 'abc.lower()Can you say strings are character lists? Why? Why not?
From the string S = "CARPE DIEM", which ranges return "DIE" and "CAR"?
What happens when from a string slice you skip the start and/or end values of the slice?