spacepaste

  1.  
  2. myinput=myscreen.getstr() #reads in string from keyboard: "b r h9 1 1"
  3. entree = inner.split() #splits string by words
  4. if entree[0]=='b': #this works
  5. build(entree[1], entree[2], int(entree[3]), int(entree[4])) #***problem here with entree[2] it is not properly passing the list name h9?
  6. #this is suppose to be the equivalent of the following line
  7. build('r',h9,1,1) #this works
  8. #build uses the 2d list h9 i.e. print h9[0][1]
  9. Error: IndexError: string index out of range
  10.