Posted By

louscomp on 12/17/09


Tagged

check python type String console function integer


Versions (?)

Check variable type in python.


 / Published in: Python
 

How to check data type. Test it in interactive mode.

  1. # This is a string.
  2. c = "Hello World"
  3.  
  4. # And this is an integer.
  5. e = 23
  6.  
  7. # We can check with the function type
  8. type(c)
  9. type(e)

Report this snippet  

You need to login to post a comment.