File Handling in python is where you can read, write and edit files from within python. There are also different functions and modes in this as well. There is also another concept called modules where you can use functions from another file.

Image from Edureka.co

There are several modes and functions for file handling.

Append/Append Plus Mode

Append mode is where you can append something to your file. Append plus is where you also read it. In the next line you use the write functions. There is no append() function.

Read/Read Plus Mode

With this you can only display your file not edit it. Read plus is where you…


Lets get the elephant out of the room! What are global and Local variables? For this example I'm going the keep this within the context of return statements.

(I don't own this image this is fromwww.guru99.com)

A global variable is a variable created outside of a statement or at least defined outside of a statement. Whereas a local variable is defined inside of the statement.

let me show you and example code:


by Rithwik K

Floats vs Integers

Integers are basically anything that is a number in python. But before you start typing decimals there is another data type. Its called a float which is a number that is a decimal which is technically a different data type.

You can make equations with integers and store them in a variable to get the answer and access it later. You can use it for range in for loops. When you want to access a certain range of numbers your can use it.


What a string looks like.

Python strings are one of the first things you would probably learn in python.

What is a string?

What is a string? A string is anything inside of quotation marks. You can also instead of quotation marks put a “ ‘ “. Anything inside a string is like plain text the main thing your do with strings is put them is display it to the user.

You can display it using print and putting a string in it directly. …

Python Student

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store