0

I'm using python=3.10. While coding I came across a strange behavior.

x = "x"*10
print(x[0:1000])

Which prints "x"*10 with no IndexError which is unexpected. Why is this not an error?

Inyoung Kim 김인영
  • 1,434
  • 1
  • 17
  • 38

0 Answers0