Computer Science, asked by fdFsdffsdf, 9 months ago

str = "Programming Language" Find the value of str [6: ]

Answers

Answered by niishaa
0

A string is nothing but an array of characters so we can use the indexes to access the characters of a it. Just like arrays, the indexes start from 0 to the length-1.

You will get IndexError if you try to access the character which is not in the range. For example,

if a string is of length 6 and you try to access the 8th char of it then you will get this error.

You will get TypeError if you do not use integers as indexes, for example if you use a float as an index then you will get this error.

so , The value of str[6:] => "Program"

Similar questions