1

This is my code:

firstName = cursor.execute("SELECT firstName FROM students WHERE id = %s" % idRemove)
print(firstName)

And this is what i get in return:

<sqlite3.Cursor object at 0x00E88C20>
1
  • See this Commented Mar 1, 2019 at 0:43

1 Answer 1

1

The function return a cursor object.

print(firstName.fetchone())
Sign up to request clarification or add additional context in comments.

2 Comments

Yeah it works thank you! The result is: ('Lord',) But is there a option to remove the brackets and commas?
print(firstName.fetchone()[0])

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.