- 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.
推薦閱讀
- Learn TypeScript 3 by Building Web Applications
- 基于粒計算模型的圖像處理
- LabVIEW Graphical Programming Cookbook
- Java 9 Concurrency Cookbook(Second Edition)
- Functional Kotlin
- Responsive Web Design by Example
- Cocos2d-x學習筆記:完全掌握Lua API與游戲項目開發 (未來書庫)
- Visual Basic程序設計
- Go語言精進之路:從新手到高手的編程思想、方法和技巧(2)
- Python大學實用教程
- SwiftUI極簡開發
- MyBatis 3源碼深度解析
- jQuery技術內幕:深入解析jQuery架構設計與實現原理
- Python 3快速入門與實戰
- IBM RUP參考與認證指南