如何檢查我的查詢集中是否有空列?如何檢查python中的空列
這是我的代碼:
mastercard_percent = ClientPaymentOption.objects.filter(name='MasterCard', client=client).values_list('itemcharged',flat=True)
if mastercard_percent == [None]:
print 'empty'
print mastercard_percent
,我只拿到了這一點:
[None]
我也試着在我的代碼變成:
if mastercard_percent == [None]:
print 'empty'
print mastercard_percent
,但它也打印:
[None]
在此先感謝...