title: why am I getting the TypeError: unsupported operand type(s) for -: 'str' and 'int'
body: <p>I'm trying to make a program that prints a calendar but its not printing what I Want it too.</p>
  <p>It's suppose to print:</p>
  <pre><code>              Month                       
  Sun  Mon  Tues  Wed  Thurs  Fri  Sat
              1    2     3     4    5    
   6    7     8    9    10    11   12 
  13   14    15   16    17    18   19 
  20   21    22   23    24    25   26 
  27   28    29
  </code></pre>
  <p>but instead its printing:</p>
  <pre><code>              Month                       
  Sun  Mon  Tues  Wed  Thurs  Fri  Sat
  for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [    for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [    for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [    for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [    for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [
  </code></pre>
  <p>This is what I have, can someone help with what's wrong?</p>
  <pre><code>while (month != &quot;January&quot; and month != &quot;February&quot; and month != &quot;March&quot; and month != &quot;April&quot; and month != &quot;May&quot; and month != &quot;June&quot; and month != &quot;July&quot; and month != &quot;August&quot; and month != &quot;September&quot; and month != &quot;October&quot; and month != &quot;November&quot; and month != &quot;December&quot;):
      print (&quot;Thats not a correct response, please try again. &quot;)
      month = input(&quot;Enter the name of the month: &quot;)
  
  week = input(&quot;Enter the day of the week the month begins (1-7): &quot;)
  
  while (week != &quot;1&quot; and week != &quot;2&quot; and week != &quot;3&quot; and week != &quot;4&quot; and week != &quot;5&quot; and week != &quot;6&quot; and week != &quot;7&quot;):
      print (&quot;Thats not a correct response, please try again. &quot;)
      week = input(&quot;Enter the day of the week the month begins (1-7): &quot;)
  
  numDays = input(&quot;Enter the number of days in the month: &quot;)
  
  while (numDays != &quot;28&quot; and numDays != &quot;29&quot; and numDays != &quot;30&quot; and numDays != &quot;31&quot;):
      print (&quot;Thats not a correct response, please try again. &quot;)
      numDays = input(&quot;Enter the number of days in the month: &quot;)
             
  name = month
  days = numDays
  start = week
  
  c = [&quot; for x in range(start-1)] + [str(x) for x in range(1,days+1)] + [&quot; for x in range(35-(days+start-1))]
  
  print(&quot;{:^50s}&quot;.format(name))
  print(&quot;\t&quot;.join([&quot;Sun&quot;,&quot;Mon&quot;,&quot;Tues&quot;,&quot;Wed&quot;,&quot;Thurs&quot;,&quot;Fri&quot;,&quot;Sat&quot;]))
  for x in range(0,len(c),7):
      print(&quot;\t&quot;.join(c[x:x+7]))
  </code></pre>