def build_sql_command(table_name, info):
    """Return a string of the sql command needed to insert data in the database."""
    key_list = list(info.keys())
    val_list = list(info.values())
    
    sql_command = 'INSERT INTO ' + table_name + ' ('
    
    #Add column names to command
    for i in range(len(key_list)):
        if i != len(key_list) - 1:
            sql_command += key_list[i] + ', '
        else:
            sql_command += key_list[i] + ') VALUES ('
            
    #Add values to command     
    for i in range(len(val_list)):
        #Text values in SQLite need surrounding quotes
        if type(val_list[i]) == str:
            data = "'" + val_list[i] + "'"
        else:
            data = str(val_list[i])
            
        if i != len(val_list) - 1:
            sql_command += data + ', '
        else:
            sql_command += data + ');'
        
    return sql_command