DEV Community

Discussion on: Daily Challenge #1 - String Peeler

Collapse
 
skeptycal profile image
Michael Treanor

Python:

code:

import sys
print("\n".join([arg[1:-1] for arg in sys.argv[1:] if len(arg) > 2]))

example:

# example

❯ ./first_and_last.py this is a bad example
hi
a
xampl