Python Matrix Addition

Here you will get program for python matrix addition. In python “list” concept is there rather than arrays.  For implementing matrix we should take help of lists in python. Matrix can be represented as nested lists. Suppose if we want to implement 2×3 matrix then python syntax will look like this. Matrix=[[1,2,3],[4,5,6]]     #This is 2×3 …

Python Matrix Addition Read More »

Python Read and Write File

In this tutorial, you’ll learn how to read and write file in Python. Program to Write to File f = open(“newtext.txt”,”w”) f.write(“something to be write”) f.close() Output: this program will create a new file (if not exist) named as “newtext.txt” in the same directory where our program is located and write a line “something to …

Python Read and Write File Read More »