Can any one give me the same python code format. and how to run the python script

Can any one give me the same python code format. and how to run the python script

Hi,

Here is a sample python code which will give you length of given string:

import sys

def getFirst(n):
                k = len(n)
                print(k)
                return k

if __name__ == "__main__":      
                getFirst(sys.argv[1])