words = ['John', 'nice', 'skateboarding']
statement = "%s you are so %s at %s" % w for w in words
produces
File "<stdin>", line 1
statement = "%s you are so %s at %s" % w for w in words
^
SyntaxError: invalid syntax
What am I doing wrong here? The assumption is: len(words) == number of ‘%s’ in statement
1 Answer