I have a tuple:
details = ({}, [])
Since there is no data in the next court, I want to return a null answer. For this, I write:
if not details:
return Response({})
else:
print "Not null"
But this does not seem to work, as it always goes in parts else, and printing is not null. I am new to python. Any help is appreciated.
source
share