Home How to get the number of elements in a list in Python?
Reply: 0

How to get the number of elements in a list in Python?

user222
1#
user222 Published in July 23, 2018, 10:00 am
items = []
items.append("apple")
items.append("orange")
items.append("banana")

# FAKE METHOD::
items.amount()  # Should return 3

How do I get the number of elements in the list?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.470721 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO