Show all directory content in python and rust
In Python, you can make use of the Path class from pathlib module:
from pathlib import Path
p = Path("/home/eric")
for item in p.iterdir():
print(item)
Output:
.rustup
.config
.bash_logout
snap
.cert
.sudo_as_admin_successful
.mozilla
Music
.b...
ericlin.hashnode.dev1 min read