Integer Data Types in Python

 Integer Data Types in Python   


a=5

print(a, "is of type", type(a))


a=2.0

print(a, "is of type", type(a))


a=1+2J

print(a, "is complex number?", isinstance(1+2j,complex))


Output : 

5 is of type <class 'int'>

2.0 is of type <class 'float'>

(1+2j) is complex number? True




0 comments:

Post a Comment

gurnoorsingh5974@gmail.com

Count Upper Case and Lower Case Word in a string (Python)

  Count Upper Case and Lower Case Word in a string     (Python) def string_test(s):     d={"UPPER_CASE":0, "LOWER_CASE":...