Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

a = [0,1,2,3] for a[-1] in a: print(a[-1]) The out put for this is 0 1 2 2. I don't understand. Isn't a[-1] equal three?How

a = [0,1,2,3] for a[-1] in a: print(a[-1])

The out put for this is 0 1 2 2. I don't understand. Isn't a[-1] equal three?How is the output not 3? Also, I understand "for i in a", but have a hard time understanding what does it mean by for a[-1] in a.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions

Question

What is meant by planning or define planning?

Answered: 1 week ago

Question

Define span of management or define span of control ?

Answered: 1 week ago

Question

What is meant by formal organisation ?

Answered: 1 week ago

Question

What is meant by staff authority ?

Answered: 1 week ago

Question

The nature and importance of the global marketplace.

Answered: 1 week ago