#!/usr/bin/env python """ Take a string from command line args, take it from camel case to lower. Then convert the characters into their ascii values. Reverse the string and spit it out """ import time,sys def blah(): """ Take the string specified in args. Because split by space, put each word back in the string """ str = "" for word in sys.argv[1:]: str = "%s%s " % (str, word) return str # Initialise string, temp = blah() , "" # Make lower case string = string.lower() # Get the ascii value for each character. # To make the reverse action easier, pad to three characters with leading zeros for char in string: char = ord(char) while not len( str(char) ) == 3: char = "0%s" % (char) temp = "%s%s" % (temp, char) # Reverse the string string = temp[::-1] print string