I've been learning slice() and trying all the possibities that I can think of to practice, but I came across this question.
In this example which I made, I used 3 websites:
website1 = "https://www.google.com"
website2 = "https://www.youtube.com"
website3 = "https://www.arrozcovo.com"
And used the slice function: slice(12,-4), so only the name of the website would appear on the following print:
slice_exemplo = slice(12,-4)
print(website1[slice_exemplo]) // google
print(website2[slice_exemplo]) // youtube
print(website3[slice_exemplo]) // arrozcovo
But when attempting the opposite for example: slice(-4,5), I thought that the print would be something like: .comhttps
But that didn't occur, I'm asking just out of curiosity, I know that the answer could be: "python just doesn't work like that", but if the answers could be more explanatory, I would appreciate it.