---
title: "Working With Tables in Python"
---

## Aspose.Words - Auto Fit Tables

**Python Code**

```csharp

## Demonstrate autofitting a table to the window.

self.autoFitTableToWindow()
\# Demonstrate autofitting a table to its contents.
self.autoFitTableToContents()
\# Demonstrate autofitting a table to fixed column widths.
self.autoFitTableToFixedColumnWidths()
```

## Download Running Code

Download **Auto Fit Tables (Aspose.Words)** from any of the below mentioned social coding sites:

- [GitHub](https://github.com/aspose-words/Aspose.Words-for-Java/blob/master/Plugins/Aspose_Words_Java_for_Python/tests/programmingwithdocuments/workingwithtables/autofittables/AutoFitTables.py)
