可変数の文字列を取り、各文字列を調べて に置き換える関数を定義し/
ます-
。そしてそれらを元に戻します。(ここに私の論理的な問題があります - 何を返しますか?)
def replace_all_slash(**many):
for i in many:
i = i.replace('/','-')
return many
それが正しいか?文字列を別々の文字列として再び思い出すにはどうすればよいですか?
呼び出し例:
allwords = replace_all_slash(word1,word2,word3)
しかしallwords
、関数を呼び出す前と同じように、別の文字列にする必要があります。これを行う方法?
私は理解することが明確であることを願っています