Python Classroom image

Anil  Bist / Professional / Web Technology
 
To post your Question Join Classroom
 
Question No  (6 of 31)
First 2 I 3 I 4 I 5 I 6 I 7 I 8 I 9 I 10 Last
 
Question:-
What are negative indexes and why are they used?
 
Answer:-

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.

  
 
 
 
image
Anil  Bist

Skills    Python

Qualifications :- High School - SLV, College/University - Graphic Era Deemed Univ University,
Location :-Dehradun,Dehradun,Uttarakhand,
Description:-

in 2006, i Join a web development company in Bangalore and start work on "Ruby on Rail" this is my first web development framework and we worked in this framework and develop four to five project after some time , I moved to JEE/Sturst frame work,

After some time i decided that now times come and I have to go on in my own way and I started a company name is "Soarlogic&q
Explore

 

  Students (3)

Ask 
image
Vikash
Ask 
image
Anil
Ask 
image
Anil
 
 

Recommended Classes

image shubham rauthan
I am a b.tech graduate in Information Technology and working as a Software Engineer and i wo...
Professional
image shubham rauthan
I am a b.tech graduate in Information Technology and working as a Software Engineer and i wo...
Professional
Rajendra Kumar
I have more then 5 year of Mobile App Development Experience and have worked in Android Native, I...
Professional