What is a from import statement and write the syntax for it?



What is a from import statement and write the syntax for it?..

Answer / Gireesh Chandra

The `from ... import` statement allows you to give individual items from a module a local name, so they do not need to be prefixed with the module name when used in your program. The basic syntax is: `from module_name import item1, item2, ...`. For example, `from math import sin, cos, pi`.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What is python encapsulation?

1 Answers  


How is Multithreading achieved in Python?

1 Answers  


What is lambda function ?

1 Answers  


How to install python on windows and set path variable?

1 Answers  


What is the best python interpreter?

1 Answers  


What is += in python mean?

1 Answers  


What does float () do in python?

1 Answers  


What is a Lambda form? Explain about assert statement?

1 Answers  


Does python do until loop?

1 Answers  


What is the difference between python 2 and python 3?

1 Answers  


What is composition in python?

1 Answers  


How do you extend in python?

1 Answers  


Categories