Message from Python discussions

November 2018

— So i have a code that returns None but when i use:

if that is None
print('Is none')
elif that is this:
print('Is this')
print('Is that

But it doesn't print Is none... It goes directly to the elif/else why?

Message permanent page


def get_user_fm(user_id):
data = SESSION.query(last_fm).get(user_id)
if data:
return data
return None

— This is the code that returns None if the data doesn't exists in the database

— I know is going to the elif because I get a NoneType error

— It’s not an error

— Ur just asking a condition for nothing

— What do you mean?

— Hello sir im newbie user from python and i have ide to create looping like this

1. Loop1 3. Loop3
2. Loop2 4. Loop4

I didn't have example code from this,how can i get output like that

Message permanent page

— Oh

— If u say a=None

— I will try this then

— Single window sucks though