Mar 24, 2013

Python List

List : 
A Python list contains an ordered collection of objects

E.g.,

abc = [1, 2, 3, 4, 5]

Python index of list starts from 0 (left most)
abc[0], abc[1], abc[2], abc[3], abc[4]

Python also supports negative indices from the right most, starts with -1
abc[-5], abc[-4], abc[-3], abc[-2], abc[-1]

abc[-1] is 5
abc[0] is 1



Please refer to other topics on List like :
Append to list in Python
Delete the last name from the list in Python
Remove an element from List in Python
Check an element exists in an list in Python
Python Filter Vs Map Vs List Comprehension


Please refer to Regular Expressions Concepts :
Brief on Regular Expressions
Greedy Operators in Regular Expressions in Perl
Modifiers in Regular Expressions in Perl
Capturing concept in Regular Expressions in Perl
Capture Pre Match ,Post Match, Exact match in Regular Expressions in Perl
Non Capturing Paranthesis in Regular Expressions in Perl
Substitute nth occurance in Regular Expressions in Perl
All Topics in Regular Expressions in Perl


You might also wish to read other topics like :
Python Class and Object Example
Inheritance in Python
Packages in Python
Exceptions in Python
How to remove duplicate lines from a file in Perl
How to remove duplicate lines from a file in Pyhton


No comments:

Post a Comment