Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8374

Python • Re: Problem with print in a for loop.

$
0
0
Python stupidly (IMO) uses white space as syntax, you have to indent your print statement.

Code:

for row in c:print(“%s\n” % ("Temperature ",row[1], "C Humitidy ", row[2], "% Date ", row[3]))
If it's not that then I'll leave and let a python coder step in.

Statistics: Posted by wildfire — Mon Dec 15, 2025 12:09 pm



Viewing all articles
Browse latest Browse all 8374

Trending Articles