In the code below:
def modify_note(self):
id = input("Enter a note id: ")
memo = input("Enter a memo: ")
tags = input("Enter tags: ")
if memo:
self.notebook.modify_memo(id, memo)
if tags:
self.notebook.modify_tags(id, tags)
memo and tags are string type variables. How can you write them after if, does python regard them as boolean here?
input()has a different meaning in 2.x and 3.x.