template = """mkdir /root/.ssh \\
        && chmod go-rwx /root/.ssh \\
        && apt-get install -y \\
            gcc \\
            libssl-dev \\
            python-pip \\
            openssh-server \\
PATH=/usr/local/jdk1.8.0/bin:$PATH 
"""
with open('config', 'w') as f:
    pass
Format a string in python