Why this formatted string is not working?please help! | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why this formatted string is not working?please help!

I'm trying to use formatted string to send to file.write() to write in a file content = "xxxxx" file.write( %s % content) Why it shows a syntax error? Could someone help me with this? Many thanks!

11th Apr 2017, 4:39 AM
awesomeRoo
awesomeRoo - avatar
1 Answer
0
i am really new to this but, try file.write( content ) rather than that, it maybe doesnt want listing if there is only one element
11th Apr 2017, 5:21 AM
Dex
Dex - avatar