We should be good with running print statements now and seeing the results on the command line.
Practically, same thing goes for running functions in the command line. What I mean is that for running print statements is simply a line of code.
For running a function on the command line:
In [1]:
def hello():
print "Hello World"
if I should run the code above i would not get any result because i am not making a call to the function... let's make that call
In [2]:
hello()
As you can see until i made a call to the hello function above before it gave me a result.... This is the same understanding we would apply to the Script we are about to create now
Create a file called script_function.py
In the File:
And you should have the Hello world printed to the console
And then you should have 5 stuffs printed to the console