<HTML><HEAD>
<META content="text/html; charset=utf-8" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.23543"></HEAD>
<BODY style="MARGIN: 4px 4px 1px; FONT: 10pt Tahoma">
<DIV>I am teaching my students Python the second semester using <A href="http://www.learnstreet.com/">www.LearnStreet.com</A>.  I am in need of some help.  I am having a problem with the Lists-Set 1 exercise 18.  The problem is below.  I have put in several codes and the output is 5, which is the right answer.  But it is asking for List's index logic.  I have tried support with LearnStreet but they have yet to respond.  Thank you for your time.</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>Tommy Maher</DIV>
<DIV>
<DIV style="BOX-SIZING: content-box; TEXT-ALIGN: center; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(233,242,232); FONT-VARIANT: normal; FONT-STYLE: normal; TEXT-INDENT: 0px; MARGIN: 7px auto 0px; WIDTH: 516px; FONT-FAMILY: Helvetica, Arial, sans-serif; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(51,51,51); FONT-SIZE: 1.4em; FONT-WEIGHT: normal; WORD-SPACING: 0px; text-shadow: white 0px -1px 0px; -webkit-text-stroke-width: 0px" id=exercise-details class="courseSubtitle ng-binding">18 :<SPAN class=Apple-converted-space> </SPAN><SPAN style="BOX-SIZING: content-box" class="practice_title ng-binding" ng-bind="exercise.description">Finding the length of nested lists.</SPAN></DIV>
<DIV style="BOX-SIZING: content-box; TEXT-ALIGN: left; TEXT-TRANSFORM: none; BACKGROUND-COLOR: rgb(233,242,232); TEXT-INDENT: 0px; FONT: 16px/22px Helvetica, Arial, sans-serif; WHITE-SPACE: normal; LETTER-SPACING: normal; COLOR: rgb(51,51,51); WORD-SPACING: 0px; -webkit-text-stroke-width: 0px" ng-hide="exercise.is_done">
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px" class=ng-binding ng-bind-html-unsafe="exercise.prompt">Create two lists<SPAN class=Apple-converted-space> </SPAN><CODE style="BOX-SIZING: content-box; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: rgb(249,242,244); PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-FAMILY: Monaco, Menlo, Consolas, 'Courier New', monospace; WHITE-SPACE: nowrap; COLOR: rgb(199,37,78); FONT-SIZE: 14px; PADDING-TOP: 2px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px">list1 = [1,2,3,4,5]</CODE><SPAN class=Apple-converted-space> </SPAN>and<SPAN class=Apple-converted-space> </SPAN><CODE style="BOX-SIZING: content-box; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: rgb(249,242,244); PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-FAMILY: Monaco, Menlo, Consolas, 'Courier New', monospace; WHITE-SPACE: nowrap; COLOR: rgb(199,37,78); FONT-SIZE: 14px; PADDING-TOP: 2px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px">list2 = [6,7,8,list1]</CODE>. Write a code to find the length of<SPAN class=Apple-converted-space> </SPAN><CODE style="BOX-SIZING: content-box; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: rgb(249,242,244); PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-FAMILY: Monaco, Menlo, Consolas, 'Courier New', monospace; WHITE-SPACE: nowrap; COLOR: rgb(199,37,78); FONT-SIZE: 14px; PADDING-TOP: 2px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px">list1</CODE><SPAN class=Apple-converted-space> </SPAN>in<SPAN class=Apple-converted-space> </SPAN><CODE style="BOX-SIZING: content-box; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: rgb(249,242,244); PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-FAMILY: Monaco, Menlo, Consolas, 'Courier New', monospace; WHITE-SPACE: nowrap; COLOR: rgb(199,37,78); FONT-SIZE: 14px; PADDING-TOP: 2px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px">list2</CODE><SPAN class=Apple-converted-space> </SPAN>using<SPAN class=Apple-converted-space> </SPAN><CODE style="BOX-SIZING: content-box; PADDING-BOTTOM: 2px; BACKGROUND-COLOR: rgb(249,242,244); PADDING-LEFT: 4px; PADDING-RIGHT: 4px; FONT-FAMILY: Monaco, Menlo, Consolas, 'Courier New', monospace; WHITE-SPACE: nowrap; COLOR: rgb(199,37,78); FONT-SIZE: 14px; PADDING-TOP: 2px; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px">for loop</CODE>.</P>
<DIV style="BOX-SIZING: content-box" class="method hint-section" ng-show="assignment.enable_hints">
<DIV style="BOX-SIZING: content-box; TEXT-ALIGN: center; MARGIN: 0.5em auto; HEIGHT: 40px" class="hintButtonAlign getHint">
<DIV style="BOX-SIZING: content-box" class=HintButton> </DIV></DIV></DIV>
<DIV style="BOX-SIZING: content-box" class="method hint-section" ng-show="assignment.enable_hints">
<DIV style="BOX-SIZING: content-box; HEIGHT: 15px; CLEAR: both"></DIV></DIV>
<DIV style="BOX-SIZING: content-box" class="method hint-section" ng-show="assignment.enable_hints">
<OL style="BOX-SIZING: content-box; LIST-STYLE-TYPE: none; MARGIN-TOP: 0px; MARGIN-BOTTOM: 10px">
<LI style="BOX-SIZING: content-box">
<DIV style="BOX-SIZING: content-box" class=body>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px">Use the if statement to check elements in the list2.</P></DIV></LI></OL></DIV>
<DIV style="BOX-SIZING: content-box" class=body>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px"> </P>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px">def len_of_innerlist(list2):<BR>    # your code here</P>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px"><BR>list1 = [1,2,3,4,5]<BR>print len_of_innerlist([6,7,8,list1])</P>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px"> </P>
<P style="BOX-SIZING: content-box; MARGIN: 0px 0px 10px"> </P></DIV></DIV></DIV></BODY></HTML>