title: nested directory appear while creating zip file
body: <p>I am quite new to python.Here i am trying to create zip file of "diveintomark-diveintopython3-793871b' directory.I changed the current working directory using os.chdir() function.The zip file is created but the problem is when i extract the zip file i get the the following directory</p>
  
  <pre><code>Users/laiba/Desktop/diveintomark-diveintopython3-793871b 
  </code></pre>
  
  <p>but i only want <strong>diveintomark-diveintopython3-793871b</strong> folder inside my zip folder not the whole nested directory created .Why is this happening and how i can solve this?</p>
  
  <pre><code>import zipfile, os
  
  os.chdir('c:\\Users\\laiba\\Desktop')
  myzip=zipfile.ZipFile('diveZip.zip','w',zipfile.ZIP_DEFLATED)
  
  for folder,subfolder,file in os.walk('diveintomark-diveintopython3-793871b'):
      myzip.write(folder)
      for each in subfolder:
          myzip.write(os.path.abspath(os.path.join(folder,each)))
      for each in file:
          myzip.write(os.path.abspath(os.path.join(folder,each)))
  </code></pre>