Indentation error in break,can someone help.
x=input() print("ch") if x==1: print("ch1") break elif x==2: print("ch2")
you use break in loops. x=input() print("ch") if x=="1": print("ch1") elif x=="2": print("ch2")
Break is more indented than print. That's verboten. It has to be on the same indentation level: if x == 1: print() break
I guess you have used an extra space before the break statement and possibly before 3rd print statement. But I'm not sure. Please re-indentate your code.✌🏼
Please upload your code to the code playground and post a link here
I tried that But it's still not working
It's stil not working,did it run in yours? If i'm keeping break in line with print then it's causing 'error break outside loop' and else it's causing indentation error
Choe thanks but i saw somehere on the internet they used break with if condition and it was running without any error,
Even in this app's tutorial they have used if with break.