0
Tup1=(2.5, 3.5,4.5,6.5)
print(type(ar2)) print(ar2.dtype) print(ar2.itemsize) output?
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
+ 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
0
actually I want to ask that hiw to find itemsize