How do I get the size of the list?

Asked 2 years ago, Updated 2 years ago, 18 views

items = []
items.append("hello")
items.append("python")
items.append("world")

Items.Size() 

Isn't there a function that gives 3?

python

2022-09-22 22:36

1 Answers

Write the len() function. A built-in function that can also be used in other sequence data types (string, dict, tuple, etc.). len(items) You can use it together.

For more information, see len().


2022-09-22 22:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.