KnowledgeBoat Logo

Computer Science

Which is the correct command to load just the tempc method from a module called usable ?

  1. import usable, tempc
  2. import tempc from usable
  3. from usable import tempc
  4. import tempc

Python Libraries

2 Likes

Answer

from usable import tempc

Reason — The syntax for importing single method form a module is : from <module> import <objectname>. According to the syntax, the correct method is from usable import tempc.

Answered By

3 Likes


Related Questions