LeetCode Day 6
Python sublist
So confusing...
>>> lst = "abcdefg"
>>> lst[::-1]
'gfedcba'
>>> lst[:-1:-1]
''
>>> lst[0:-1:-1]
''
>>> lst[0::-1]
'a'
So confusing...
>>> lst = "abcdefg"
>>> lst[::-1]
'gfedcba'
>>> lst[:-1:-1]
''
>>> lst[0:-1:-1]
''
>>> lst[0::-1]
'a'