Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

Python script - erorr


ghost's Avatar
0 0

Heya guys when i try to run this python script i got error >> "IndentationError: expected an indented block" << WTF!!!!!!!!! :wow:
can anyone help me there is the script

#! /usr/bin/python
s = input(&quot;If you want to create new file type 1 , if you want to open existing one type 2 &quot;)
if s==1:
n = raw_input(&quot;Enter file name: &quot;)

b = open(n + &quot;.txt&quot;,&quot;w&quot;)
b.write(raw_input(&quot;Enter file content nao: &quot;))
b.close()

if s == 2:

m = raw_input(&quot;Enter file name: &quot;)
p = open(m + &quot;.txt&quot;,&quot;w&quot;)
for line in p:
print line
p.close()

if (s&lt;1 and s&gt;2):
print &quot;Fuking noobs you must enter 1 or 2!!!!!!!!!&quot;
goto 1

ghost's Avatar
0 0

lol ? dude do u even know what indentation is ?? thats it, google it and u'll know why this is funny.


ghost's Avatar
0 0

i found solution for this problem :p i must put one character space in each new line after if statment B) easy like piece of cake