Cogenra Solar Interview Question

Make a python script to generate a square wave pattern with a certain spacing.