0
出力を取得するために使用するテストファイルがありますが、代わりに出力エラーが発生します。構文エラーが表示されます。私はPythonの初心者です。助けてください。出力が得られないのはなぜですか?
必要な出力は次のとおりです。
remove_value Test
['r', 'i', 'g']
['i', 'n', 'g']
['r', 'i', 'n']
私のコードは次のとおりです。
print("\nremove_value Test")
str_list5 = ['r','i','n','g']
new_list = list_function.remove_value(str_list5, 2)
print(new_list)
new_list = list_function.remove_value(str_list5, -1)
print(new_list)
new_list = list_function.remove_value(str_list5, 10)
print(new_list)
print("\nremove_value Test")
num_list3 = [1, 3, 4, 5, 6]
num_list3 = list_function.remove_value(num_list3, 1)
print(num_list3)
がどのように機能 –
を呼び出していますか?私は新しい申し訳ありません。その部分を書くことができますか?私はこれで最後の3時間を費やしました。 'remove_value(yourlist、remove_position)'のファイルタイプの末尾に –
がありますが、 'remove_position'と' value'は使われませんでした。 –