Rewrite the following code in python after removing all syntax error(s). Underline each correction done in the code.
STRING=''WELCOME
NOTE''
for S in range[0,8]:
print STRING(S)
print S+STRING
STRING= 'WELCOME'Also, range(0,8) will give a runtime error as the index is out of range. It should be range(0,7)
NOTE=''
for S in range (0,8):
print STRING [S]
print S, STRING