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
• 880 points
656 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
805 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, 2019 in Python by Ayman
11,219 views
+4 votes
3 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]

Try using this question by list comprehension: a=[4,7,3,2,5,9] print([x for ...READ MORE

answered Dec 9, 2019 in Python by vinaykumar
• 200 points
34,853 views
0 votes
2 answers
+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 7, 2019 in Python by Neha
• 330 points

edited Jul 8, 2019 by Kalgi 4,434 views
0 votes
1 answer
+5 votes
6 answers

Lowercase in Python

You can simply the built-in function in ...READ MORE

answered Apr 11, 2018 in Python by hemant
• 5,790 points
4,071 views
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
495 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
690 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP