0
Please how can I solve an IndentationError :expected an indented block
I want to print out a string but it shows the above error
3 Respuestas
+ 2
EPHRAIM YUSUF hi,
Please link the code here for fast solution. Indention error is come in python when you are not indent means properly give space after using any function, conditional statement to remove that just give some space after that function or conditional statement
Have these 🍎 🍎 🍎 🍎 🍎
0
Can you post your code? it sounds like you did not properly format your code, indentation is important in python, it’s the spacing in lines of code(TAB)
if you declare a function, for example:
def hello():
any code that belongs to that function must be indented as so:
def hello(): <-declared new function
print(“hello”) <-belongs to function
hello() <- calls the function(no space)
0
anything under a function, loop, conditional (anything with a colon at the end) must be indented. Python hates braces 😁