I’ve been using python as a trig calculator and I need to regularly access functions like sin, cos, tan, arcsin, pi, etc. It isn’t that troublesome to type from math import sin,cos,tan,pi
, but it is a minor hassle entering all the needed information every time I open up a new terminal.
Is there a way to simply import math
and then if I type sin
have it assume that I mean math.sin
?
SuperCool is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.