-2

If this is a dictionary in python:

Dict1 = {'a':1, 'b':2, ...}

What is this one : I was trying the os.stat() where this pattern showed up:

Nt.stat_result(st_mode=33206, st_ino=Ol, st_nlink=0, ...)

i tryed to apply dictionary methods on it and it didn't work, does anybody know what is that pattern called in python and how can i get an item out of it?

Belle
  • 451
  • 1
  • 4
  • 9

1 Answers1

0
>>> x=os.stat('.zlogin')
>>> type(x)
<class 'os.stat_result'>
>>> x
os.stat_result(st_mode=33152, st_ino=38797347, st_dev=64769, st_nlink=1, st_uid=1000, st_gid=100, st_size=52, st_atime=1500747428, st_mtime=1288432638, st_ctime=1486224877)

As you can see (and could have checked yourself), the result of os.stat is an object belonging to os.stat_result class.

Błotosmętek
  • 12,717
  • 19
  • 29