- Mastering Python Scripting for System Administrators
- Ganesh Sanjiv Naik
- 39字
- 2021-07-02 14:00:20
Updating strings
We can update a string by reassigning a new value to the specified index. Refer to the following example:
#!/usr/bin/python3
str1 = 'Hello Python!'
print ("Updated String: - ", str1 [:6] + 'John')
Output:
Updated String: - Hello John
推薦閱讀
- ASP.NET Core:Cloud-ready,Enterprise Web Application Development
- Mastering Entity Framework Core 2.0
- Implementing Cisco Networking Solutions
- Apache Karaf Cookbook
- AutoCAD VBA參數化繪圖程序開發與實戰編碼
- Getting Started with Gulp
- 硅谷Python工程師面試指南:數據結構、算法與系統設計
- Python+Tableau數據可視化之美
- Unity&VR游戲美術設計實戰
- Managing Microsoft Hybrid Clouds
- Arduino Wearable Projects
- OpenCV 3.0 Computer Vision with Java
- Python GUI Programming Cookbook(Second Edition)
- Selenium WebDriver Practical Guide
- Python物理建模初學者指南(第2版)