def clipboard_put(D, transpose=False, replace=None):
    """Construct a string suitable for a spreadsheet and put it into the
    clipboard.

    D: scalar, 1d or 2d sequence
        For example a list or a list of lists.

    transpose: Bool
        Transpose the data if True.

    replace: tuple or None
        If tuple, it is two strings to pass to the replace
        method. ('toreplace', 'replaceby')

    """
    s = _buildstr(D, transpose, replace)
    r = tk.Tk()
    r.withdraw()
    r.clipboard_clear()
    r.clipboard_append(s)
    r.destroy()
Construct a string suitable for a spreadsheet and put it into the
    clipboard.

    D: scalar, 1d or 2d sequence
        For example a list or a list of lists.

    transpose: Bool
        Transpose the data if True.

    replace: tuple or None
        If tuple, it is two strings to pass to the replace
        method. ('toreplace', 'replaceby')

    
recipes/Python/578933_Pasting_pythdatinspread/recipe-578933.py