Index

An index is the position number used to access a specific item in an array, list, or string. In most languages indexing starts at 0, so the first item is…