What is the correct way to initialize using or operator? This is what I am attempting to do:
a = 7
b = 4
c = a or b
if (c > 5):
print(c)
but it seems to only pick the value of a. This is how I was attempting to apply the above:
ref = overall.dbs.reference('mycharacter')
first = ref.order_by_child('name')
first.start_at(sub_category)
first.end_at( sub_category + "\uf8ff").get()
second = ref.order_by_child('name')
second.start_at(sub_category.capitalize())
second.end_at(sub_category.capitalize() + "\uf8ff").get()
snapshot = first or second
Here I am attempting to perform an operation on snapshot which could return null if the first letter of sub_category which is a variable provided either capitalized or not...trying to work around Firebase's orderby() case sensitivity.