Your job at E-Corp is both boring and difficult. It isn't made any easier by the fact that everyone constantly wants to have a meeting with you, and that the meeting rooms are always taken!

In this kata, you will be given an array. Each value represents a meeting room. Your job? Find the **first** empty one and return its index (N.B. There may be more than one empty room in some test cases). 

'X' --> busy
'O' --> empty

If all rooms are busy, return 'None available!'.


More in this series:

The Office I - Outed
The Office II - Boredeom Score
The Office III - Broken Photocopier
The Office V - Find a Chair

Difficulty: introductory

Starter code:

def meeting(rooms):
	

Solutions:
def meeting(rooms):
    try:
        return rooms.index('O')
    except ValueError:
        return 'None available!'


def meeting(rooms):
    return rooms.index("O") if "O" in rooms else "None available!"

def meeting(rooms):
    return next((i for i, r in enumerate(rooms) if r == 'O'), 'None available!')

def meeting(rooms):
    try:
        return rooms.index("O")
    except:
        return "None available!"

def meeting(rooms):
    if 'O' not in rooms: return 'None available!'
    return rooms.index('O')

def meeting(rooms):
    for num, status in enumerate(rooms):
        if status == 'O':
            return num
    return 'None available!'

def meeting(rooms):
    return [o  for o,v in enumerate(rooms) if v=='O'][0] if 'O' in rooms else 'None available!'

def meeting(rooms):
    tally = 0
    for i in rooms:
        if i == "O":
            return tally
        else:
            tally += 1
    return("None available!")
              
             


def meeting(rooms):
    for x in rooms:
        if (x is 'O'):
            return(rooms.index(x))
    return('None available!')


def meeting(rooms):
    return next((i for i, x in enumerate(rooms) if x=='O'), 'None available!')