Python: Interactive Mode

Interactive mode is the quickest way you can start using Python. To use the Python interactive shell we just need Python installed on the machine. Start Interactive Shell Then just type the command “python“, and you will get into the interactive shell- Or if you have Python 3 installed separately, and available as the command … Read more

Python: Hello World

As a tradition here is the code for the “hello world” program in Python. Create a file with any name you prefer. We are naming the file as “hello”. Then extension of the file should be “.py”. Now, add the following code to the file “hello.py”-

Python function: print() [ printing in Python ]

print function is used to print/output text on the screen or to a file. print() is a built-in function in Python. Generally, we just pass a string as the first parameter, and the string literal is printed. We can use single or double quotes to enclose the string literals, as both are allowed to represent strings in Python.