Currently:
For ex:
a = "abcde"
print("b[::-1] : ", b[::-1])
print("b[5:0:-1] : ", b[5:0:-1])Output:Output:>>> b[::-1] : edcba
>>> b[5:0:-1] : edcbCan a custom function be defined that avoids duplicity in typing?For ex:
def fuc(a)
print(a, ":", a) # change here
fuc(b[::-1])
fuc(b[5:0:-1])Output:Output:>>> b[::-1] : edcba
>>> b[5:0:-1] : edcb
