Reputation: 31
Basically what ls() does in r is that it is used to list the names of all the objects that are present in the working directory. I want to do the same in python, could someone please help me with this ? I'm a python newbie ;-;
Upvotes: 3
Views: 4697
Reputation: 6224
you can use os.listdir()
import os
print(os.listdir('.')) # here '.' for current directory.
Upvotes: 2