2차전지주 TOP 10 핵심정리
https://chosunstock.com/2%ec%b0%a8%ec%a0%84%ec%a7%80%ec%a3%bc-top-10-%ed%95%b5%ec%8b%ac%ec%a0%95%eb%a6%ac?feed_id=871&_unique_id=65d37dbf8927f
len(value)
# testing len()
str1 = "Welcome to Guru99 Python Tutorials"
print("The length of the string is :", len(str1))
산출:
The length of the string is : 35
# to find the length of the list
list1 = ["Tim","Charlie","Tiffany","Robert"]
print("The length of the list is", len(list1))
산출:
The length of the list is 4
# to find the length of the tuple
Tup = ('Jan','feb','march')
print("The length of the tuple is", len(Tup))
산출:
The length of the tuple is 3
# to find the length of the Dictionary
Dict = {'Tim': 18,'Charlie':12,'Tiffany':22,'Robert':25}
print("The length of the Dictionary is", len(Dict))
산출:
The length of the Dictionary is 4
# to find the length of the array
arr1 = ['Tim','Charlie','Tiffany','Robert']
print("The length of the Array is", len(arr1))
산출:
The length of the Array is 4