Print Syntax Incorrect

Actually the problem is in second part of print statement. Because when you write

'IMPLEMENTATION FOR %s', '#' * 25 % "test"

%s needs to be replaced but you don’t. So it should be like this.

print '#' * 25, 'IMPLEMENTATION FOR %s %s'  % ('#' * 25, initialize.ntw_device[index].hostname)

And also maybe you should consider using format function instead of %s.

Leave a Comment