About 50 results
Open links in new tab
  1. How can I determine a Python variable's type? - Stack Overflow

    532 You may be looking for the type() built-in function. See the examples below, but there's no "unsigned" type in Python just like Java. Positive integer:

  2. python - Determine the type of an object? - Stack Overflow

    2398 There are two built-in functions that help you identify the type of an object. You can use type() if you need the exact type of an object, and isinstance() to check an object’s type against something. …

  3. How to prrint the Data Type in Python? - Stack Overflow

    I am new to Python. I have written a simple code to know the Data type of input. Here is my code. I gave 2 inputs that are getting convert as a "String". Using the "If" condition to match inputs d...

  4. printing - Print variable and a string in python - Stack Overflow

    If the Python version you installed is 3.6.1, you can print strings and a variable through a single line of code. For example the first string is "I have", the second string is "US Dollars" and the variable …

  5. python - Writing code to print out the data type of variables - Stack ...

    Apr 12, 2022 · I am new to python. I have to print the data type for a few variables. However, the variable tripped me up. The input file is the variable which is a csv data file. Now I am confused, does …

  6. python - Print a variable's name and value - Stack Overflow

    print x # easy to type, but no context print 'x=',x # more context, harder to type 12 x= 12 How can write a function that will take a variable or name of a variable and print its name and value? I'm interested …

  7. What's the canonical way to check for type in Python?

    Aug 3, 2014 · Type hints in Python allow types to be checked but in a very different way from statically typed languages. Type hints in Python associate the expected types of arguments with functions as …

  8. In Python what is it called when you see the output of a variable ...

    For print(a) I would say "I print the variable a". For typing a by itself would it be correct to say "I implicitly print the variable a"? Or something else? Is there Python documentation that discusses this?

  9. python - How to print types within a list - Stack Overflow

    Jan 27, 2016 · In the python code above type () function is used to determine the data type of variable (i). And end () is used to replace the end of the output with the value inside its' brackets () instead of …

  10. python - Viewing all defined variables - Stack Overflow

    Mar 11, 2009 · It shows the same details as the MATLAB analog (variable name, type, and value/data). Note that in the Python interpreter, whos lists all variables in the "interactive namespace".