- 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.
推薦閱讀
- 軟件安全技術
- JavaScript高效圖形編程
- Mastering OpenCV Android Application Programming
- Learning RxJava
- C++面向對象程序設計(微課版)
- ASP.NET Core 2 and Vue.js
- Quarkus實踐指南:構建新一代的Kubernetes原生Java微服務
- Python數據分析從0到1
- Apache Spark 2.x for Java Developers
- Java系統化項目開發教程
- QGIS 2 Cookbook
- Java Web開發實例大全(基礎卷) (軟件工程師開發大系)
- 單片機原理及應用技術
- 深入淺出Python數據分析
- 從零開始學Python大數據與量化交易