Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def printTabulated(collection, headers=None):
"""Call either tabulate.tabulate(), or our internal alternateTabulate()."""
if HAVE_TABULATE:
tabulated = tabulate_impl(collection, headers=headers)
else:
tabulated = alternateTabulate(collection, headers=headers)
if tabulated:
print(tabulated)