trouble to print array contents using slice operator
praba kar
prabapython at yahoo.co.in
Sat Apr 16 10:28:27 EDT 2005
Dear all,
In Php array_slice function base
we can print array contents as per our desire
eg)
$a = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15);
$arr = array_slice($a,10,10);
this function will print 11,12,13,14,15
But I try to print the same thing in python
using slice operator
eg) print a[10:10]
This statement print [] empty array.
How I need to get my desired output like php
array_slice function?
with regards
Prabahar
________________________________________________________________________
Yahoo! India Matrimony: Find your life partner online
Go to: http://yahoo.shaadi.com/india-matrimony
More information about the Python-list
mailing list