SlideShare a Scribd company logo
1 of 2
Download to read offline
String manipulation functions
Pseudo Code Python
ThisString[P]
//Counts from 1
CHR(i : INTEGER)
//RETURNS CHAR whose ASCII
value is i
ASC(ch)
//RETURNS the ASCII INTEGER
value of character ch
LENGTH(S : STRING)
//RETURNS INTEGER
LEFT(S : STRING, L : INTEGER)
//RETURNS STRING
LEFT(“JOY”, 2) //JO
RIGHT(S: STRING, L : INTEGER)
//RETURNS STRING
RIGHT(“Sami”, 2) //mi
MID(S : STRING, P: INTEGER, L :
INTEGER)
//RETURNS STRING
MID (“SAMI”, 2,3) //AMI
LCASE(Ch : CHAR)
//RETURNS CHAR
UCASE(Ch : CHAR)
ThisString[P]
#Counts from 0
chr(i)
ord(‘A’)
len(S)
S[0:L]
#slicing
S[-L:]
S=”Sami”
print (S[-3:])
S[P : P + L]
Ch.lower()
CH =”A”
Ch.upper()
//RETURNS CHAR
TO_UPPER(S : STRING)
//RETURNS STRING
TO_LOWER(S : STRING)
RETURNS STRING
S1 & S2
Ch=”a”
S.upper()
S=”sami”
S.lower()
s = S1 + S2

More Related Content

More from Ahmed Elmalla

Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications
Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications
Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications Ahmed Elmalla
 
Ahmed Elmalla Agile software projects
Ahmed Elmalla Agile software projectsAhmed Elmalla Agile software projects
Ahmed Elmalla Agile software projectsAhmed Elmalla
 
Ahmed Elmalla - Guardian testmonial
Ahmed Elmalla - Guardian testmonialAhmed Elmalla - Guardian testmonial
Ahmed Elmalla - Guardian testmonialAhmed Elmalla
 
Ahmed Elmalla - Business Case KACST
Ahmed Elmalla  - Business Case KACSTAhmed Elmalla  - Business Case KACST
Ahmed Elmalla - Business Case KACSTAhmed Elmalla
 
Ahmed Elmalla Using AI to predict chronic diseases
Ahmed Elmalla Using AI to predict chronic diseases Ahmed Elmalla Using AI to predict chronic diseases
Ahmed Elmalla Using AI to predict chronic diseases Ahmed Elmalla
 
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...Ahmed Elmalla
 
Ahmed Elmalla Software projects
Ahmed Elmalla Software projectsAhmed Elmalla Software projects
Ahmed Elmalla Software projectsAhmed Elmalla
 
Ahmed Elmalla Private Tutor Resume
Ahmed Elmalla Private Tutor ResumeAhmed Elmalla Private Tutor Resume
Ahmed Elmalla Private Tutor ResumeAhmed Elmalla
 

More from Ahmed Elmalla (8)

Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications
Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications
Ahmed Elmalla Certificate Stanford evaluations AI Healthcare Applications
 
Ahmed Elmalla Agile software projects
Ahmed Elmalla Agile software projectsAhmed Elmalla Agile software projects
Ahmed Elmalla Agile software projects
 
Ahmed Elmalla - Guardian testmonial
Ahmed Elmalla - Guardian testmonialAhmed Elmalla - Guardian testmonial
Ahmed Elmalla - Guardian testmonial
 
Ahmed Elmalla - Business Case KACST
Ahmed Elmalla  - Business Case KACSTAhmed Elmalla  - Business Case KACST
Ahmed Elmalla - Business Case KACST
 
Ahmed Elmalla Using AI to predict chronic diseases
Ahmed Elmalla Using AI to predict chronic diseases Ahmed Elmalla Using AI to predict chronic diseases
Ahmed Elmalla Using AI to predict chronic diseases
 
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...
Ahmed Elmalla - Pandemic tracker project by Python & Computer science tutor i...
 
Ahmed Elmalla Software projects
Ahmed Elmalla Software projectsAhmed Elmalla Software projects
Ahmed Elmalla Software projects
 
Ahmed Elmalla Private Tutor Resume
Ahmed Elmalla Private Tutor ResumeAhmed Elmalla Private Tutor Resume
Ahmed Elmalla Private Tutor Resume
 

Recently uploaded

From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxNeo4j
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIInflectra
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmuxevmux96
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Lisi Hocke
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletAndrea Goulet
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jNeo4j
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringPrakhyath Rai
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAShane Coughlan
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Flutter Agency
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationElement34
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMarkus Moeller
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Varun Mithran
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypseTomasz Kowalczewski
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNeo4j
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Andreas Granig
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024SimonedeGijt
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...drm1699
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Conceptsthomashtkim
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfkalichargn70th171
 

Recently uploaded (20)

From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptxFrom Knowledge Graphs via Lego Bricks to scientific conversations.pptx
From Knowledge Graphs via Lego Bricks to scientific conversations.pptx
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
Your Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | EvmuxYour Ultimate Web Studio for Streaming Anywhere | Evmux
Your Ultimate Web Studio for Streaming Anywhere | Evmux
 
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
Team Transformation Tactics for Holistic Testing and Quality (NewCrafts Paris...
 
Community is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea GouletCommunity is Just as Important as Code by Andrea Goulet
Community is Just as Important as Code by Andrea Goulet
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
The Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test AutomationThe Strategic Impact of Buying vs Building in Test Automation
The Strategic Impact of Buying vs Building in Test Automation
 
Microsoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdfMicrosoft365_Dev_Security_2024_05_16.pdf
Microsoft365_Dev_Security_2024_05_16.pdf
 
Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...Incident handling is a clearly defined set of procedures to manage and respon...
Incident handling is a clearly defined set of procedures to manage and respon...
 
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
Abortion Clinic In Springs ](+27832195400*)[ 🏥 Safe Abortion Pills in Springs...
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024Automate your OpenSIPS config tests - OpenSIPS Summit 2024
Automate your OpenSIPS config tests - OpenSIPS Summit 2024
 
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
Wired_2.0_CREATE YOUR ULTIMATE LEARNING ENVIRONMENT_JCON_16052024
 
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
Abortion Pills For Sale WhatsApp[[+27737758557]] In Birch Acres, Abortion Pil...
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdfThe Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
The Evolution of Web App Testing_ An Ultimate Guide to Future Trends.pdf
 

Python Vs Pseudo code String Manipulation

  • 1. String manipulation functions Pseudo Code Python ThisString[P] //Counts from 1 CHR(i : INTEGER) //RETURNS CHAR whose ASCII value is i ASC(ch) //RETURNS the ASCII INTEGER value of character ch LENGTH(S : STRING) //RETURNS INTEGER LEFT(S : STRING, L : INTEGER) //RETURNS STRING LEFT(“JOY”, 2) //JO RIGHT(S: STRING, L : INTEGER) //RETURNS STRING RIGHT(“Sami”, 2) //mi MID(S : STRING, P: INTEGER, L : INTEGER) //RETURNS STRING MID (“SAMI”, 2,3) //AMI LCASE(Ch : CHAR) //RETURNS CHAR UCASE(Ch : CHAR) ThisString[P] #Counts from 0 chr(i) ord(‘A’) len(S) S[0:L] #slicing S[-L:] S=”Sami” print (S[-3:]) S[P : P + L] Ch.lower() CH =”A” Ch.upper()
  • 2. //RETURNS CHAR TO_UPPER(S : STRING) //RETURNS STRING TO_LOWER(S : STRING) RETURNS STRING S1 & S2 Ch=”a” S.upper() S=”sami” S.lower() s = S1 + S2