def deleteSpace1(s1):
    """
    delete space in String
        sample:  "  abc   x  y z   " => "abc x y z"
    """
    sa = (s1.strip()).rsplit()
    sres = ""
    for i in range(len(sa)):
        if i>0:
            sres +=' '
        sres += sa[i]
    return sres