Code Study-New to programming
<p>i am new to programming and have been studying some code to get to know about OOP.Here is what i have understood and need help on,
1) import gym and env=gym.make('String') : This means gym is a library, and make is a class under it? Have we created an object instance?</p>

<p>I understood classes contains methods inside them..i.e functions..but in this case i am not able to decipher clearly.The line after this env.monitor.start()..this contains 3 parts..what does each indiciate..i thought env was an object instantiated earlier.</p>

<pre><code>import gym
env = gym.make('CartPole-v0')
env.monitor.start('/tmp/cartpole-experiment-1',force=True)
for i_episode in range(20):
    observation = env.reset()
    for t in range(1009):
        env.render()
        print(observation)
        action = env.action_space.sample()
        observation, reward, done, info = env.step(action)
        if done:
            print("Episode finished after {} timesteps".format(t+1))
            break

env.monitor.close()
</code></pre>

<p>Thanks for your help, apologise if the question is stupid</p>