We can loop over this range using Python’s for-in loop (really a foreach). Python Code to remove redundant data from a list. Again, we can also traverse through NumPy arrays in Python using loop structures. So now will make use of the list to create a python matrix. Using Numpy is advised especially when you need to display the result in matrix form. So now will make use of the list to create a python matrix. Or the fastest way is using Numpy from Scipy library. Usually people will create it as list inside list. Python Code to Read two Strings & Concatenate the Strings, 21. Given two user input matrix. In this article, we will discuss How to print matrix in python using for loop. In this article, we will discuss How to print matrix in python using for loop. Method 1. Both the while loop and range-of … Python code to Automate Instagram Login. Create empty 2d or two dimensional array using Python, 8. Example. Python code to Calculate sum and average of a list of Numbers, 11. Python For Loop. You can use the for in loop to loop through all the elements of an array. Currently exploring Data Science, Machine learning and Artificial intelligence. In Python, there is not C like syntax for(i=0; i