1 Replies - 258 Views - Last Post: 26 September 2012 - 11:39 AM Rate Topic: -----

#1 kehara15  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 42
  • Joined: 13-September 12

Error in Code. Need some suggestions!

Posted 26 September 2012 - 11:36 AM

My code is below. It works but then python tells me it is going out of range.

def fun3():
    count = 0
    myList = list (range(5))
    while count < len(mylist)+1:
        count = count+1
        print (myList[i])


Is This A Good Question/Topic? 0
  • +

Replies To: Error in Code. Need some suggestions!

#2 modi123_1  Icon User is online

  • Suitor #2
  • member icon



Reputation: 8399
  • View blog
  • Posts: 31,251
  • Joined: 12-June 08

Re: Error in Code. Need some suggestions!

Posted 26 September 2012 - 11:39 AM

There is no need to create a duplicate post. Closing.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1