Given a string s of length n, the slicing operation
s[i : j]
in Python 3, where
(0 <=i <= j <= n)
, takes how much time in Big-O notation?
Is it O(n) or O(1) or something else?
Edit
Also is there any implementation difference in slicing of a list and a string in python 3?