D. The fetchall method returns an empty list when no rows are available.
This is incorrect. The fetchall() method does indeed return an empty list [] when no rows are available, but the statement is phrased ambiguously. Since no rows are available, fetchall() returns an empty list rather than None, which makes the statement technically true, but it is somewhat misleading since the key point is that the list will be empty, not that no rows are available.
Seems A,B,D are correct.
The standard Python library has a module called sqlite3, providing an interface compliant with the DB-API 2.0 specification.
https://edube.org/learn/pcpp1-5/working-with-an-sqlite-database
It's also possible to use a special name, :memory:, which creates a database in RAM:
conn = sqlite3.connect(':memory:')
Other 2 ways to create database:
conn = sqlite3.connect('hello.db')
conn = sqlite3.connect('C:\sqlite\hello.db')
https://edube.org/learn/pcpp1-5/creating-a-database
The fetchall method returns an empty list when no rows are available.
https://edube.org/learn/pcpp1-5/reading-data-2
upvoted 3 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Stokvisss
1 month, 1 week agoclaudiupopa
1 month, 4 weeks agoMoneybing
4 months, 2 weeks ago