Category «Python»

Map Reduce in python

Map and Reduce are two powerful methods of Python that is used to solve big logical problems, suppose you have to calculate how many routers are making error in network. So write a single function and map it with list of files. The Reducer will then count the total number of routers. Python Code..

Fibonacci number

In Mathematics, the Fibonacci numbers are the numbers in the following integer sequence called the Fibonacci sequence, and characterized by the fact that every number after the first two is the sum of the two preceding ones: In Python we may write the solution like this.. #Create a list and instantiate it with 0,1 lst=[0,1] #Run a loop …