displaying data loaded by our function
时间: 2024-05-01 09:19:46 浏览: 81
数据加载提示
4星 · 用户满意度95%
Sure, I can help you with that! To display the data loaded by our function, we can simply use the `print()` function.
For example, let's say our function is called `load_data()` and it returns a list of numbers. We can display the data like this:
```
data = load_data()
print(data)
```
This will print the list of numbers to the console.
If the data is more complex, such as a dictionary or a nested list, we can use the `pprint` module to display it in a more readable format:
```
import pprint
data = load_data()
pprint.pprint(data)
```
This will print the data in a more structured and easy-to-read format.
阅读全文