<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described.
<END_TASK>
<USER_TASK:>
Description:
Count of lines required to write the given String
Function to return the number of lines required ; If string is empty ; Initialize lines and width ; Iterate through S ; Return lines and width used ; Driver Code ; Function call to print required answer

<ASSISTANT_TASK:>
Python Code:
def numberOfLines(S , widths ) : 
	 if(S == "") : 
	 return 0 , 0 
  lines , width = 1 , 0 
 for c in S : 
	 w = widths[ord(c ) - ord(' a ' ) ] 
 width += w 
 if width > 10 : 
	 lines += 1 
 width = w 
   return lines , width 
  S = "bbbcccdddaa "
 Widths =[4 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 , 1 ] 
 print(numberOfLines(S , Widths ) ) 

<END_TASK>
