I am noob and trying to understand Python.
For os.walk documentation says that it returns a tuple (dirpath, dirnames, filenames)
just of understanding I am trying to use it like below
import os
from os.path import join, getsize
file=[]
dir=[]
xroot,dir,file = os.walk('C:\Python27\mycode')
But it gives me error like : xroot,dir,file = os.walk('C:\Python27\mycode') ValueError: need more than 2 values to unpack
My question is why cant I assign it like above rather then it being part of loop (most example use that)?