直接赋值创建
```python
dic = {'spam': 1, 'egg': 2, 'bar': 3}
使用`dict()`函数
```python
dic = dict(spam=1, egg=2, bar=3)
通过关键字参数创建
```python
dic = dict(name='Jack', age=18, height=180)
通过二元组列表创建
```python
list_of_tuples = [('name', 'Jack'), ('age', 18), ('height', 180)]
dic = dict(list_of_tuples)
使用`zip()`函数
```python
dic = dict(zip('abc', [1, 2, 3]))
使用字典推导式
```python
dic = {i: 2*i for i in range(3)}
使用`dict.fromkeys()`方法
```python
dic = dict.fromkeys(range(3), 'x')
以上是Python中创建字典的七种常见方法。您可以根据需要选择合适的方法来创建字典