Implementation of 'sequ' sequence command using Python