There are several functions we are going to use quite frequently. In this section, we will discuss them briefly. The functions are print()
, type()
, upper()
, strip()
, and last expression _
. We will also learn how to merge two string variables. The true power function pow()
discussed earlier belongs to this category as well.
Occasionally, we need to print something on screen. One way to do so is to apply the
print()
function as shown in the following example:
>>>import math >>>print('pi=',math.pi) pi= 3.141592653589793
At this stage, a new user just applies this format without going into more detail about the print()
function.