I've created this working for loop in Python:
a = 'word'
for i in range(len(a)):
print a[i:] + a[:i], (a[i:] + a[:i])[::-1]
and I need to make it executable from the command line and also have it be able to take in new arguments.
I'm a little hazy on how to do this. I know that you need to use
if __name__ == '__main__':
somehow...And that I need to use sys.argv
If anyone could explain how to do this, and the format for making any script executable from the command line, I would really appreciate it.