Python Forum
IndentationError: expected an indented block
Thread Rating:
  • 2 Vote(s) - 3.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IndentationError: expected an indented block
#1
I have a list e2f, (english to french), i am trying to create a new directory f2e, i am getting
IndentationError: expected an indented block, i used space, tab but not working

how do i resolve it ? also, is : necessary after the for loop syntax

e2f ={'dog':'chien','cat':'chat','walrus':'morse'}
>>> for e,f in e2f(items):
... f2e(f)=e
  File "<stdin>", line 2
    f2e(f)=e
      ^
IndentationError: expected an indented block
Reply


Messages In This Thread
IndentationError: expected an indented block - by python1980 - Dec-03-2017, 08:47 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Need help with "IndentationError: expected an indented block" hequ 3 6,556 Mar-02-2020, 06:26 AM
Last Post: Pranav
  IndentationError: unexpected indent belikewater 6 10,978 Oct-31-2017, 12:32 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020