Articles → Python → Import Selected Attributes Of A Module In PythonImport Selected Attributes Of A Module In PythonIn this article, we will import selected attributes of a module in Python.Example In this example, we will import the pi attribute of the math module. Consider the following example: -from math import pi print(pi)Output Call Tan Function Change the above code.from math import pi print(tan(1))Output The reason is we have imported only pi attribute not tan.Posted By - Karan Gupta Posted On - Friday, April 19, 2019 Query/Feedback Your Email Id** Subject* Query/Feedback Characters remaining 250**
from math import pi print(pi)
from math import pi print(tan(1))
Query/Feedback