- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 134字
- 2021-07-02 14:00:22
Triple quotes in Python
Python's triple quotes functionality for strings is used to span multiple lines, including newlines and tabs. The syntax for triple quotes consists of three consecutive single or double quotes. Refer to the following code:
#!/usr/bin/python3
para_str = """ Python is a scripting language which was created by
Guido van Rossum in 1991, t which is used in various sectors such as Game Development, GIS Programming, Software Development, web development,
Data Analytics and Machine learning, System Scripting etc.
"""
print (para_str)
It produces the following output. Note the tabs and newlines:
Output:
Python is a scripting language which was created by
Guido van Rossum in 1991, which is used in various sectors such as
Game Development, GIS Programming, Software Development, web development,
Data Analytics and Machine learning, System Scripting etc.
推薦閱讀
- 計算思維與算法入門
- PySide GUI Application Development(Second Edition)
- Hands-On Microservices with Kotlin
- Unity 5 for Android Essentials
- MATLAB for Machine Learning
- C語言開發基礎教程(Dev-C++)(第2版)
- 零基礎學C++(升級版)
- IPython Interactive Computing and Visualization Cookbook
- SSH框架企業級應用實戰
- 基于GPU加速的計算機視覺編程:使用OpenCV和CUDA實時處理復雜圖像數據
- Solr權威指南(下卷)
- Android技術內幕(系統卷)
- Visual Basic語言程序設計上機指導與練習(第3版)
- React.js實戰
- Practical Time Series Analysis