File handling in Python

This tutorial guides you about some basic concept of File handling in Python. We can open the file in a number of ways according to need For example – Writing, Reading, Adding more content to file, etc. Its file handling functions are little similar to C language. Contents Different Modes Opening file with different-different modes Closing … Read more

Modules and import in Python

Sometimes you may think that “how do I import some code I wrote in one file into another”?. You don’t want to write the same block of codes or redefine in your file. I this tutorial we talked about it. Contents What is Module Import Import with alias from with import Difference between from import … Read more

How to create function in Python

A function is a block of code that performs some specific task and returns back to the caller. It has a unique name.

They are helpful when need to perform the same task with different-different values or require to use the same block of code in other places within the program.

If any changes require in the future then only need to update the function code and it will automatically make changes where the function it been called.

The main aim of a function is –

  1. To make the program more readable, and organized and,
  2. Reduce repeated code.

How to create function in Python

Read more