79241201

Date: 2024-12-01 08:57:44
Score: 1
Natty:
Report link

this too removes the last character in the string

alphabets = 'abcdefgh'


print(alphabets[:-1])

the[:-1] slices the last character specified in the -1. hence the output is abcdefg. slicing h

Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: george njue