0
def convertWeight(value, unit, unitToConvert) -> converterdWeight:
convertor = w(unit = 0)
unitValue = w(unit = value)
return convertor + unitValue
convertWeight(20, 'g', 'oz')
これは測定モジュールを使用し、関数内の変数を定義します。体重(kg = 10)。パラメータからのデータを使用してPython変数を設定できますか?
私はパラメータがこのそうthartよう機能を作りたい、
def func(parameter):
weight(parameter = 10)
私はこれをどのように行うことができますか?