0

Tup1=(2.5, 3.5,4.5,6.5)

print(type(ar2)) print(ar2.dtype) print(ar2.itemsize) output?

15th Nov 2019, 2:40 PM
Âaryahi Âashi
Âaryahi Âashi - avatar
3 Answers
+ 2
Go and test in Code Playground, you'll know for yourself what output is there. Even whether the code runs or not. If you want explanation for code then you should ask "How this code works" or "Need explanation for a code" or anything asking for explanation, rather than the code output
15th Nov 2019, 3:07 PM
Ipang
+ 2
If you want to count how many items there is in a tuple, you can simply use `len` function. tup = (2000, 2010, 2020) print(len(tup)) # prints 3 I'm not sure what you were trying to do with that `dtype` in your example. Tuple doesn't have `dtype` nor `itemsize` attribute. Try to read this intro on Python tuple for better understanding 👍 https://www.studytonight.com/python/tuples-in-python
15th Nov 2019, 4:39 PM
Ipang
0
actually I want to ask that hiw to find itemsize
15th Nov 2019, 4:09 PM
Âaryahi Âashi
Âaryahi Âashi - avatar