AWK substr function explained with examples

We already writtn one excellent string manipulation post for shell. This post is in response to the code which I seen in my office for greping IP address from ifconfig command. The command is.. ifconfig eth0 | grep 'inet addr' | cut -d: -f 2 | awk '{print $1}' Above command explanation: Grep command will filter ifconfig command(…)

Learn Python List with examples

A List is an ordered set of values, where each value is identified by an index. The values that make up a list are called its elements. Lists are similar to strings, which are ordered sets of characters, except that the elements of a list can have any type, you can put numbers, letters, strings(…)

10+ Python Tuples examples

Status: Completed A Tuple is a sequence of immutable elements, It is similar to a list but uses different syntax. With tuples we cannot change elements. This makes programs more predictable. So tuples can be used as values, unlike classes, they never change. Define Tuple: A tuple is immutable: it cannot be changed after created.(…)

Python String examples

Status :  Completed A 'string' is simply a list of characters in order. A character is anything you can type on the keyboard in one keystroke, like a letter, a number, or a backslash. For example, "hello" is a string. It is five characters long h, e, l, l, o. Strings can also have spaces:(…)

Python Integers explained with examples

An integer in Python, also known as a 'numeric literal', is simply a name used for a numeric value. For this reason, these values are commonly called integers even if they are assigned the value of a real number in the form of an integer and a decimal value. Integers are immutable data types, which(…)

Python Boolean Type and None Type examples

What is Boolean ?  Boolean is a data type, having two values usually denoted True and False, intended to represent the truth values of logic. It is named after "George Boole", who first defined an algebraic system of logic in the mid 19th century. The Boolean data type is the primary result of conditional statements,(…)

Python scripts to download video and audio files

Below are some of my scripts which I used to download videos for offline viewing. Script1: One day I come across a motivational blog which I liked it a lot. Below script will download all the podcasts from that site for my offline listening  #!/usr/bin/env python import urllib2 import re import subprocess for i in(…)

Python Variable Types

In previous tutorial we have learned writing "Hello World!" program in python and using print command and operators, Now we are going to learn what is variable and different variable types in python. First of all, What is variable ? In computer programming, a variable is a storage location or memory location and an associated(…)

40+ Online help resources for Python learning

Status : Completed As we all know python is extensively used for server side application, webapps, mobile development, system administration, GUI application, and many more, you might be having doubts and facing a lot of challenges, to solve those queries and problems there many online web communities, forums, blogs are maintained actively to provide help(…)

Python Builtin Help(dir, help, type and ___doc_) Functions

          Status: Completed There are many online resources available to get help in python programming, #"Here is my list of online resources". Instead of this python has many built in methods and functions which we can use to get many information about python and python built in modules and other methods. This built in methods(…)