Python

359
4669 reads

February 2, 2013

Basic Python Strings


This example illustrates the basic definitions of a string and the ways in which they are defined.

61
1505 reads

February 1, 2013

Python-Continue Statement


Continue Statement :
The continue statement, also borrowed from C, continues with the next iteration of the loop.

49
1228 reads

February 1, 2013

Python-Break Statement


Break statement :
The break statement, like in C, breaks out of the smallest enclosing for or while loop.

388
5664 reads

February 1, 2013

2D lists


This example shows how to create a 2D array using a list and how to display that 2D list in a matrix format

38
1365 reads

February 1, 2013

Python-For Loop


For Loop :

127
1481 reads

February 1, 2013

List as a Stack


This example illustrates the use of lists as a stack along with the basic stack handling operations:
popping
adding

27
1369 reads

February 1, 2013

Python-While Loop


While Loop :
A loop statement allows us to execute a statement or group of statements multiple times.

276
3976 reads

February 1, 2013

Working with Arrays


This example shows how to use the basic operations on lists and tuples:
insertion
appending
deleting

33
1299 reads

January 31, 2013

String Formatting Operator


One of Python's coolest features is the string format operator " % ". This operator is unique to strings and makes up for the pack of having functions from C's printf( ) family .

40
1196 reads

January 31, 2013

String Operators


String Operators:
+ - Adds values on either side of the + operator.
* - Creates new strings, concatenating multiple copies of the same string.
[ ] - Gives the character from the given index.