Showing posts with label Python. Show all posts
Showing posts with label Python. Show all posts

Friday, 7 February 2014

Effective and Faster String Building in Python

          Many times we use string building in many languages and also in python. Here is a tip for a fast string building in Python.

Commonly Used:

string1 = "Example" + " for "+ " String Building"   #Commonly used by regular developers

The above method of concatenation is not a best practice most of object oriented language will provide methods for such operations like "join" method in Python.


Best Practice:

string1 = "".join("Example"," for","String Building")   #Best practice for faster execution


 Using String Building in Python:

string1 = "%s %s %s" % ("Example","for","String Building") # Another Best Practice and very fast







Thursday, 30 January 2014

About Python and Google Appengine

Python is a light weight,easy and dynamic programming language that became popular in last couple of years.  Python can run on Windows, Linux/Unix and Mac OS and it is free to use for commercial also because of its Open Source License. You can find the License on Python's official website.


Google also supports its Python written web application top host on its most popular Google Appengine. The developer guide for Google appengine for python is available at this link.

As on the date of this post Google is providing the Python 2.7 for websites hosted on Google Appengine.
There are many web frameworks available for python language like Webapp2, Django.

You can download the latest version of Python form the Pythons Official website.



Useful Links: