Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What is the function of negative index?



What is the function of negative index?..

Answer / chaitanya

The sequences in python are indexed and it consists of the positive as well as negative numbers. The numbers that are positive uses ‘0’ that is uses as first index and ‘1’ as the second index and the process goes on like that. The index for the negative number starts from ‘-1’ that represents the last index in the sequence and ‘-2’ as the penultimate index and the sequence carries forward like the positive number. The negative index is used to remove any new-line spaces from the string and allow the string to except the last character that is given as S[:-1]. The negative index is also used to show the index to represent the string in correct order.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Python Interview Questions

What are loops in python?

0 Answers  


Which module(s) of python can be used to measure the performance of your application code?

0 Answers  


What is the difference between Python and PHP?

0 Answers  


Which all are the operating system that Python can run on?

0 Answers  


What are the types of functions in python?

0 Answers  


What is a function?

0 Answers  


How do I publish a package in python?

0 Answers  


What is the best python interpreter?

0 Answers  


How is python interpreted language?

0 Answers  


Does python have null?

0 Answers  


What are the types of inheritance in python?

0 Answers  


How to redirect the output of a python script from standout(ie., A monitor) on to a file?

0 Answers  


Categories