Answers for "can u length a dictionary in python"

2

python get size of dictionary

d = {"foo": "bar"}
size = len(d)
Posted by: Guest on March-07-2020
0

can u length a dictionary in python

obj = {0:"hello", 1:"there"}

for i in range(len(obj)):
  print(obj[i])
  
print(len(obj))
Posted by: Guest on February-18-2021

Code answers related to "can u length a dictionary in python"

Python Answers by Framework

Browse Popular Code Answers by Language