0

Print my list horizontally and not vertically.

https://code.sololearn.com/c0ZCxUwf4g41/?ref=app I want the python3 code in the link to print results in a horizontal list and not a vertical one. what do I add to my function to get what I need?

21st Jun 2018, 3:26 PM
Symon
Symon - avatar
3 Antworten
+ 1
print(i, end=' ')
21st Jun 2018, 3:35 PM
Lstiti
0
when I put: print(I, end=' ') it gives me a syntax error on the '='
23rd Jun 2018, 8:50 AM
Symon
Symon - avatar
0
mylist = range(2000,3000) for i in mylist : if i%5 !=0 and i%7 == 0: print(i,end=' ') This is your code with my change . And it works just fine when I run it.
23rd Jun 2018, 11:54 AM
Lstiti