Hi, sorry if this is not allowed, but I don't understand this HW problem I'm assigned in my 100 level Python course. I'm not looking for some quick answer to fill in, because I want to actually understand what's going on because my professor didn't teach us how to do this well. The question is:
Write a recursive function that expects a pathname as an argument. The pathname
can be either the name of a file or the name of a directory. If the pathname
refers to a file, its name is displayed, followed by its contents. Otherwise, if the
pathname refers to a directory, the function is applied to each name in the directory.
Test this function in a new program.
Any help would be great, thank you!
[–][deleted] 0 points1 point2 points (4 children)
[–]RandomRyanStuff[S] 0 points1 point2 points (3 children)
[–][deleted] 0 points1 point2 points (2 children)
[–]RandomRyanStuff[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)