KwickClips Python · 38 sec · free
Is 88 read from a CSV a number?
Short answer. No. It is the string '88'.
How do you do maths with it?
Convert it with int() first.
Remember
| Values are strings |
| Use int() for maths |
You read eighty eight from a CSV file. Is it a number? Here a list of lines stands in for a file. Each row is a list. See, eighty eight has quotes. No, every value is a string. Use int before maths.
This clip is from the full lesson: CSV Files with the csv Module — 6 minutes, with the tables, the quick answers and the whole lesson in text.
Useful for: CBSE Class 12 Computer Science (083), CBSE Class 12 Computer Science (083), CBSE Class 11 Artificial Intelligence (843), Programming All levels Python
More KwickClips from this lesson
What does CSV stand for?38 sec
What does writerows() take?41 sec
Why is there a blank row after every CSV row?42 secVoice-over is AI-generated; the script is written and checked by Kajal Ma'am. Confirm anything you plan around against your official board document. We never ask for a password or an OTP.

