List all contents of a folder

0 votes
How do I list all the files and directories present in a folder using python?
Jun 22, 2018 in Python by nightshade
• 870 points
18 views

1 answer to this question.

0 votes
Use listfor() from the os library
answered Jun 22, 2018 by Hamartia's Mask
• 1,580 points

Related Questions In Python

0 votes
1 answer

Join all strings in a list of strings

s = " ".join(myList) #here " " ...READ MORE

answered May 30, 2018 in Python by Nietzsche's daemon
• 4,260 points
13 views
0 votes
1 answer

Python function to find a list of all keywords

You can use the keyword module for ...READ MORE

answered Jun 17 in Python by Ayman
17 views
0 votes
2 answers

Write a for loop that prints all elements of a list and their position in the list. a = [4,7,3,2,5,9]

a = [4,7,3,2,5,9] b = enumerate(a) for i in ...READ MORE

answered Jul 15 in Python by Kei Tee

edited 1 day ago by Kalgi 55 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 135 views
+4 votes
6 answers
0 votes
1 answer

Print contents of a folder

There is a function provided in python ...READ MORE

answered Jun 18, 2018 in Python by Hamartia's Mask
• 1,580 points
24 views
0 votes
1 answer

Split a string into a list of characters

This is easy. Just use the list() ...READ MORE

answered Jun 19, 2018 in Python by Hamartia's Mask
• 1,580 points
16 views