1

I am trying to check the type of my variable user. When I do that :

print(typ(user))

I got that <class 'method'>

But now I would like to check the type of the variable user.

So I did that :

if type(user) == 'method':
    # my code

But it doesn't work, the type 'method' is not knownn by Python ... I don't know why.

Could you help me please ?

Thank you very much !

Tom
  • 143
  • 1
  • 11

0 Answers0