0
Can somebody explain this code to me print('abcd' [-3,-1]). Thank youuu
3 ответов
+ 6
print('abcd' [-3:-1])
Last element is at index -1.
So at index -3 you have 'b'.
You need to move from index -3 to -1 (excluded). Hence it prints 'bc'.
+ 5
hi,
can you confirn it is
'abcd' [-3:-1]
?
0
Thank you