引用符のないすべてのテキストを空白に置き換える

引用符のないすべてのテキストを空白に置き換える

次のファイルがあります

"""Some docstring and stuff.

More lines, etc etc.

"""

a = 'Another quoted text and there\'s "more contents" ' + "anything with double-quotes and single quotes around it" + "more text. Doesn't matter what" \
    """\
    A multi-line statement here. Some arbitrary text

    """

ファイルの内容を読み、この代替内容をできるだけ効率的に印刷したいと思います。


"""Some docstring and stuff.

More lines, etc etc.

"""

    'Another quoted text and there\'s "more contents" '   "anything with double-quotes and single quotes around it"   "more text. Doesn't matter what"
    """
    A multi-line statement here. Some arbitrary text

    """

どうすればいいですか?理想的には、ストリーミング/ Unixパイプを使用して出力をディスクに書き込むための費用を支払う必要がないソリューションが必要です。お持ちですか?Linuxコマンドラインツールこれはうまくいきますか?

ベストアンサー1

おすすめ記事