#!/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
#!/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