Learn various tips and tricks based on print()

Various Tips and Tricks:
To perform this tutorial step-by-step with me, you’ll need Python3 already configured on your local development machine. You can set up everything you need before-hand and then come back to continue ahead.

1. Printing sum of two numbers
Printing sum of two numbers is a two-step process:

Define two variables, say a and b and store their sum in third variable, say c.
Print out the sum stored in the third variable, i.e., c.
Both these steps can be implemented in numerous ways in various languages. But we will be using the most basic syntax available with Python’s print statement.

print(“Sum of”, a, “and”, b, “is”, c)
If you want to use more easier syntaxes for doing the same task or this syntax seems difficult to write when you have loads of variables then you can follow on for more better tricks to use with python( ).

C-inspired syntax

Author's Bio: 

BRAIN MENTORS Pvt. Ltd. started with a mission to link the IT industry and educational institutions. We aim to transform our every student into an IT professional who is ready to be employed in the industry.