<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def tableexists(tablename):
 """Test if a table exists."""

    result = True
    try:
        t = table(tablename, ack=False)
    except:
        result = False
    return result