Python Error in for loop

Hello,

I am new to python. I am following a tutorial and the first for loop is returning a syntax error. I dont know whats wrong in the following:

import random 
import sys
import os
for x in range(0, 10):
	print(x , ' ', end="")
 

print('\n')

grocery_list = ['juice', 'tomatoes','banannas', 'potatotos']

for y in grocery_list:
	print(y)
import random 
import sys
import os
for x in range(0, 10):
	print(x , ' ', "end=")
 

print('\n')

grocery_list = ['juice', 'tomatoes','banannas', 'potatotos']

for y in grocery_list:
	print(y)

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.