Ask a Question
Ask Question Login
Corporate Training
  1. Community
  2. Python
  3. Question
Python

Why am I receiving a python error expecting an indented block?

Asked by Diana Campbell Jul 27, 2023 448 views 1 answer
Share

About this question

I want to execute the below-mentioned code:

Def example (p,q):

A = p . find (“ “)
B = q . find (“ “)
Str_p = p [0:a]
Str_q = p [b+1 : ]
If str_p == str_q:
Result = true
Else : 
Result = false
Return result
 I am seeing the error 
IndentationError : expected an indented block

Why am I seeing a Python error ‘expected an indented block’ ?

Your answer

1 Answer

More Python discussions

Learn & Explore

Free tutorials and interview questions from industry experts — learn the skill, then get ready to prove it.

Latest Python Blogs

Guides, tips and career advice on Python from JanBask experts.