0

I creat A folder and inside that folder i create 4 more folders name 1, 2, 3, 4 (just empty). And use them i am us

import os
data_path='/home/nd/Desktop/directory1'
data_dir_list = os.listdir(data_path)

The above code show different behaviour on spyder installed on ubuntu and windows. (Python 3.6, ubuntu 16.04 , windows 10). For ubuntu data_dir_list='1', '2', '4', '3' and for windows it is '1', '2', '3', '4'. enter image description here enter image description here

Aran-Fey
  • 39,665
  • 11
  • 104
  • 149
Hitesh
  • 1,285
  • 6
  • 20
  • 36

0 Answers0