How to find the type of variable in Python?

0 votes
I am new to Python. I want to know is there any method to know the type of variable in Python?
Jul 16 in Python by Neel
• 2,450 points
13 views

1 answer to this question.

0 votes
i=277
type(i) # int
i = 2.56j
type(i) # complex
i = 999.99
type(i)# float
answered Jul 16 by Arvind
• 2,520 points

Related Questions In Python

–1 vote
2 answers

How to find the size of a string in Python?

following way to find length of string  x ...READ MORE

answered Mar 29 in Python by rajesh
• 1,210 points
72 views
0 votes
1 answer
0 votes
1 answer

How can I find out the index of an element from row and column in Python?

You probably want to use np.ravel_multi_index: [code] import numpy ...READ MORE

answered Apr 16, 2018 in Python by charlie_brown
• 7,710 points
65 views
0 votes
1 answer

How to get the size of a string in Python?

If you are talking about the length ...READ MORE

answered Jun 4, 2018 in Python by ariaholic
• 7,320 points
69 views
+1 vote
2 answers

how can i count the items in a list?

Syntax :            list. count(value) Code: colors = ['red', 'green', ...READ MORE

answered Jul 6 in Python by Neha
• 330 points

edited Jul 8 by Kalgi 168 views
+4 votes
6 answers
0 votes
1 answer

How to find exponent of a number in Python?

Yes you can do it using the ...READ MORE

answered Jul 2 in Python by Arvind
• 2,520 points
14 views
0 votes
1 answer

How to find runtime complexity of funtions that use list in Python?

The Average Case assumes parameters generated uniformly ...READ MORE

answered Jul 26 in Python by Arvind
• 2,520 points
12 views