- Practical Data Wrangling
- Allan Visochek
- 128字
- 2021-07-02 15:16:08
Strings
A value with a string data type is simply a collection of characters. You've already seen a string data type in use from the hello world program that you created earlier, namely, Hello World!. String values are created in Python by writing the contents of a string inside quotation marks:
>> "your string here"
Two or more strings can be merged together or concatenated using the + operator:
>> "string 1 " + "string 2"
Python does not distinguish between single quotes and double quotes; however, the opening quotes must be the same as the closing quotes ( "This will not work').
I will cover string operations in detail in Chapter 5, Manipulating Text Data - An Introduction to Regular Expressions.
推薦閱讀
- 嵌入式系統(tǒng)應(yīng)用
- 控制與決策系統(tǒng)仿真
- 基于LPC3250的嵌入式Linux系統(tǒng)開發(fā)
- TestStand工業(yè)自動化測試管理(典藏版)
- Hands-On Data Science with SQL Server 2017
- 機器人智能運動規(guī)劃技術(shù)
- 條碼技術(shù)及應(yīng)用
- Spark大數(shù)據(jù)技術(shù)與應(yīng)用
- Chef:Powerful Infrastructure Automation
- Building Google Cloud Platform Solutions
- Microsoft Dynamics CRM 2013 Marketing Automation
- 設(shè)計模式
- 機器人剛?cè)狁詈蟿恿W(xué)
- OSGi原理與最佳實踐
- 自動化生產(chǎn)線組建與調(diào)試(第2版):以亞龍YL-335B為例(三菱PLC版本)