Jump to content

Get length of list


ReaMart

Recommended Posts

I have a list of players and I want something to happen when there are more than 2 players in the list. How would I achieve this? And how would I send the amount of players required to chat? In my favorite programming language, python, this would be something like

if len(list) > 2:
	do something
else:
	print("not enough players, need " + str(3 - len(list)) + " more players"
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...