#!/usr/bin/python
import os
for x in os.listdir("/home/"):
print x
error: File "./p1", line 4 print x ^ IndentationError: expected an indented block
Python 2.7.12
You need to indent your code properly:
import os
for x in os.listdir("/home/"):
    print x
IndentationErrorin line 4. at theprintstatement. where there should be an 'indented block', just what the error message states. what is unclear about that?print xprint xhas an indentation error. It cannot be more specific