Archives for Python
Find the largest and smallest number in python using for loop
Write a python program to find the largest and smallest number in python using for loop Assign first element of an array to largest(lt) and smallest (st) value the array…
Find two numbers whose sum is equal to a given number in sorted array
Find two numbers whose sum is equal to a given number in sorted array In order to find the sum of the two array elements you need to traverse in array and check the sum of each element. Let's take an example of below sorted array in which we have…
Bubble sort program in python
Write a Program in Python to execute Bubble sort program What is Bubble Sort Program ? Bubble sort is a simple sorting algorithm that compares adjacent elements and swaps them…
Program to print Fibonacci series in python
The Fibonacci numbers, commonly refers as Fibonacci sequence, in which each number is the sum of the two preceding numbers, starting from 0 and 1. The Fibonacci Sequence is the…
Reverse String in Python using Recursion
Let's understand what is the recursion in programming with reverse string program Recursion is a process by which a function calls itself directly or indirectly. The corresponding function is called as recursive function When…
How to read a config file in Python
How to read a config file in Python: This article will help you to read config based on the environment. For example, If you have a python script which uses…
Python Script to Access Team Foundation Server (TFS) Rest API
I was working in a project where I have to access Team Foundation Server (TFS) Rest API in Python script. It was little bit tricky job to access TFS REST…
Get File MIME Type in Python
Get file MIME type in Python You can get mime type in python by using python-magic library. You can install python-magic using PIP. $ pip install python-magic To find mime…