1 min read

Import Duty

The import statement is used to import the duty module from the Python library. The duty module provides functions for calculating duties on goods.

Here is an example of how to import the duty module:

pythonimport duty

Once the module is imported, you can use the functions provided by the duty module:

pythonduty.calculate_duty(price, country)

where:

  • price is the price of the good.
  • country is the country of origin of the good.

Here is an example of how to calculate the duty on a good:

pythonduty_amount = duty.calculate_duty(100, "USA")print(duty_amount)

Output:

10.0

This code will calculate the duty on a good of $100 that is originating from the United States and print the result, which is $10.0.

Additional Resources:

Disclaimer