SlideShare a Scribd company logo
1 of 3
Download to read offline
String
Formatting
Python Tutorial
by Menard Maranan
“String Formatting”
XString Formatting
String Formatting in a Nutshell:
>>>String Formatting deals with
manipulating how a string works.
>>>You can do a lot of cool
things with Strings besides
printing them out on the screen.
“String Formatting”
XString Formatting
What you’ll learn:
>>>Concatenating Strings
>>>Multiplying Strings
>>>%s
>>>.format() and f-string
>>>r-strings

More Related Content

More from Menard Maranan

Python while loops (menard maranan)
Python while loops (menard maranan)Python while loops (menard maranan)
Python while loops (menard maranan)Menard Maranan
 
Python if else statements (menard maranan)
Python if else statements (menard maranan)Python if else statements (menard maranan)
Python if else statements (menard maranan)Menard Maranan
 
Python tuples (menard maranan)
Python tuples (menard maranan)Python tuples (menard maranan)
Python tuples (menard maranan)Menard Maranan
 
Python sets (menard maranan)
Python sets (menard maranan)Python sets (menard maranan)
Python sets (menard maranan)Menard Maranan
 
Python dictionaries (menard maranan)
Python dictionaries (menard maranan)Python dictionaries (menard maranan)
Python dictionaries (menard maranan)Menard Maranan
 
Python nested lists (menard maranan)
Python nested lists (menard maranan)Python nested lists (menard maranan)
Python nested lists (menard maranan)Menard Maranan
 
Python lists (menard maranan)
Python lists (menard maranan)Python lists (menard maranan)
Python lists (menard maranan)Menard Maranan
 
Python data structures (menard maranan)
Python data structures (menard maranan)Python data structures (menard maranan)
Python data structures (menard maranan)Menard Maranan
 
Python comments (menard maranan)
Python comments (menard maranan)Python comments (menard maranan)
Python comments (menard maranan)Menard Maranan
 
Python indexing (menard maranan)
Python indexing (menard maranan)Python indexing (menard maranan)
Python indexing (menard maranan)Menard Maranan
 
Slides python booleans (menard maranan)
Slides   python booleans (menard maranan)Slides   python booleans (menard maranan)
Slides python booleans (menard maranan)Menard Maranan
 
Slides python numbers (menard maranan)
Slides   python numbers (menard maranan)Slides   python numbers (menard maranan)
Slides python numbers (menard maranan)Menard Maranan
 
Python strings Tutorial (menard maranan)
Python strings Tutorial (menard maranan)Python strings Tutorial (menard maranan)
Python strings Tutorial (menard maranan)Menard Maranan
 
Python Learning Journey
Python Learning JourneyPython Learning Journey
Python Learning JourneyMenard Maranan
 

More from Menard Maranan (15)

Python while loops (menard maranan)
Python while loops (menard maranan)Python while loops (menard maranan)
Python while loops (menard maranan)
 
Python if else statements (menard maranan)
Python if else statements (menard maranan)Python if else statements (menard maranan)
Python if else statements (menard maranan)
 
Python tuples (menard maranan)
Python tuples (menard maranan)Python tuples (menard maranan)
Python tuples (menard maranan)
 
Python sets (menard maranan)
Python sets (menard maranan)Python sets (menard maranan)
Python sets (menard maranan)
 
Python dictionaries (menard maranan)
Python dictionaries (menard maranan)Python dictionaries (menard maranan)
Python dictionaries (menard maranan)
 
Python nested lists (menard maranan)
Python nested lists (menard maranan)Python nested lists (menard maranan)
Python nested lists (menard maranan)
 
Python lists (menard maranan)
Python lists (menard maranan)Python lists (menard maranan)
Python lists (menard maranan)
 
Python data structures (menard maranan)
Python data structures (menard maranan)Python data structures (menard maranan)
Python data structures (menard maranan)
 
Python comments (menard maranan)
Python comments (menard maranan)Python comments (menard maranan)
Python comments (menard maranan)
 
Python indexing (menard maranan)
Python indexing (menard maranan)Python indexing (menard maranan)
Python indexing (menard maranan)
 
Slides python booleans (menard maranan)
Slides   python booleans (menard maranan)Slides   python booleans (menard maranan)
Slides python booleans (menard maranan)
 
Slides python numbers (menard maranan)
Slides   python numbers (menard maranan)Slides   python numbers (menard maranan)
Slides python numbers (menard maranan)
 
Python strings Tutorial (menard maranan)
Python strings Tutorial (menard maranan)Python strings Tutorial (menard maranan)
Python strings Tutorial (menard maranan)
 
Python infographics
Python infographicsPython infographics
Python infographics
 
Python Learning Journey
Python Learning JourneyPython Learning Journey
Python Learning Journey
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....rightmanforbloodline
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)Samir Dash
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxMarkSteadman7
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
TEST BANK For Principles of Anatomy and Physiology, 16th Edition by Gerard J....
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
AI+A11Y 11MAY2024 HYDERBAD GAAD 2024 - HelloA11Y (11 May 2024)
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Simplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptxSimplifying Mobile A11y Presentation.pptx
Simplifying Mobile A11y Presentation.pptx
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 

Python string formatting (menard maranan)