I’ve shared with you Why everyone needs to be a programmer, and that I strongly believe that those that have some “programming” skills will have an advantage in life over those that do not.

I also shared Why Linux is the best development environment.

I’m here to tell you Why Python is the best development language.

Popularity

Python is becoming the most popular programming language in the world, and the most searched programming language in the US

The next several sections explain why it is so popular

Python is accessible

Python is incredibly easy to learn and use by beginners. Part of the reason is the simplified syntax with an emphasis on natural language. I provide a 2-day and 3-day course on Python.

The following code uses http://bit.ly to shorten URLs programmatically, using an API key you sign up for.

import os
import sys
sys.path.append('../')
import bitly_api

BITLY_ACCESS_TOKEN = "82c0cbd8764baa9eca79836651c8d23498b3456c"


def get_connection():
    """Create a Connection base on username and access token credentials"""
    if BITLY_ACCESS_TOKEN not in os.environ:
        raise ValueError("Environment variable '{}' required".format(BITLY_ACCESS_TOKEN))
    access_token = os.getenv(BITLY_ACCESS_TOKEN)
    bitly = bitly_api.Connection(access_token=access_token)
    return bitly


def testApi():
    bitly = get_connection()
    data = bitly.shorten('http://google.com/')
    assert data is not None
    assert data['long_url'] == 'http://google.com/'
    assert data['hash'] is not None


def testExpand():
    bitly = get_connection()
    data = bitly.expand(hash='test1_random_fjslfjieljfklsjflkas')
    assert data is not None
    assert len(data) == 1
    assert data[0]['error'] == 'NOT_FOUND'


def testReferrer():
    bitly = get_connection()
    data = bitly.referrers(hash='a')
    assert data is not None
    assert len(data) > 1


def testProDomain():
    bitly = get_connection()
    test_data = {
        'cnn.com': False,
        'nyti.ms': True,
        'g.co': False,
        'j.mp': False,
        'pep.si': True,
        'http://pep.si': 'INVALID_BARE_DOMAIN',
    }
    for domain in test_data:
        try:
            result = bitly.pro_domain(domain)
            assert result == test_data[domain], domain
        except bitly_api.BitlyError as e:
            assert str(e) == test_data[domain]


def testUserInfo():
    bitly = get_connection()
    data = bitly.user_info()
    assert data is not None
    assert 'login' in data

Now when you make a twitter bot you can shorten all your URLs.

Python Has a Healthy, Active and Supportive Community

Geate software is supported by great people, and Python is no exception. Python’s user base is enthusiastic and dedicated to spreading use of the language far and wide. The community can help support the beginner, the expert, and adds to the ever-increasing open-source knowledgebase.

Python Has Amazing Libraries

The python language allows you to incorporate libraries that have functionality allowing you to assemble some slick solutions to automate your personal and professional life.

There are a number of standard libraries in addition to a host of Essential Python Packages every developer should have.

Where to go from here

Getting Started with Python
Essential Python Packages

Categories: Article