Slices past the end and the in operator
Predict the outputMedium-HardPython only
s = "abc"
print("" in s, "ac" in s, "bc" in s)
print(repr(s[5:10]))
print(s[-10:2])
print(s[1:1] == "")
This question is part of Pro+
Pro+ opens every question in Interview Prep and the mock interview. Every article and the first 2 questions of each topic stay free. Hands-on Selenium and API tasks follow their course lesson's own lock.