some time ago i had a problem to solve wich i needed a python script.
but i couldnt compile it -,-
also i-- generate another error, WTF?!Code:i = 0 for i in range(0,10): print 'Hello World!'
Compile? You mean run, Python scripts aren't compiled normally, they're just interpreted.
You don't need to declare that i = 0 at the beginning, it'll do that automatically when you say "for i in range(0, 10)". You can still do that, nothing wrong with it, it just won't do you any good since the "in range" part will make i = 0 at the beginning anyway. The second problem is the clencher, Python works using whitespace, which you didn't provide any for the for loop. Do it this way instead:
[highlight=Python]for i in range(0, 10):
print 'Hello World!'[/highlight]
That'll work properly.
EDIT: Also, i-- doesn't work, use --i instead.
Wow I changed my sig!
thx for answer, now works fine. i was wondering why when i ctrl+v code it doesnt work, now i know.
whatever~Code:Compile? You mean run, Python scripts aren't compiled normally, they're just interpreted.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks