title: How to user "Discrete" object in openai-gym environments?
body: <p>I am trying to create a Q-Learning agent for a openai-gym "Blackjack-v0" environment. I am trying to get the size of the observation space but its in a form a "tuples" and "discrete" objects.</p>
  
  <p>All I want is to return the size of the "discrete" object. When I print "env.observation_space[0]", it returns "Discrete(32)". I've found the class on github (<a href="https://github.com/openai/gym/blob/master/gym/spaces/discrete.py" rel="nofollow noreferrer">https://github.com/openai/gym/blob/master/gym/spaces/discrete.py</a>), but nothing is showing how to return the integer "32" or even the value at say "env.observation_space[0][5]".</p>
  
  <p>Is there other functions I can use to return the size of the "discrete" object, and the value itself at a certain index?</p>
  
  <p>Here is some code:</p>
  
  <pre><code>print(state_size[0]) # Discrete(32)
  # I want it to print 32, not Discrete(32)
  print(state_size[1]) # Discrete(11)
  # I want it to print 11, not Discrete(11)
  print(state_size[2]) # Discrete(2)
  # I want it to print 2, not Discrete(2)
  
  print(q_table[state_size[0][0]]) # TypeError: 'Discrete' object does not support indexing 
  # I want to return the value of the "Discrete" object
  </code></pre>