Possible duplicate:how to list all directory files in python
How can I list all the contents of a directory using python and add it to the list?
With Python, there are so many ways to do this, but this is the easiest I know.
Please see comments on output specifications.
from os import listdir list = listdir("C:\Users\Hello\World\Python Programs") print list #Outputs the whole list print len(list) #Checks for the length of the list print list[26] #Outputs a specific element in the list
Good luck
Source: https://habr.com/ru/post/1435629/More articles:Postgres SQL: getting one result for the date when the start and end column of the date is dateUnable to play flash video in Android webview - androidUITextField in custom UITableViewCell not showing - iosHow to load a page in the middle of the page - javascriptHow to load a web page at the bottom of the site. - javascriptHow to load a page in the middle of the page (instead of the top)? - javascriptDisplay languages ββon Android browser / GUI (Gujarati) - androidUIButton TouchUpInside sometimes fails - iosXcode: how to handle a lot of slightly different goals / applications based on the same source code - xcodeIgnoring files in Git after they are committed - gitAll Articles