Coding with Python Strings

Lab Steps

lock
Connecting to the Python Web IDE
lock
Exercise 1 - Counting
lock
Exercise 2 - Finding
lock
Exercise 3 - Formatting
lock
Exercise 4 - Splitting

The hands-on lab is part of this learning path

Ready for the real environment experience?

This is a long-running lab that you can pause for up to 1 hour

You can pause this lab for
up to 1h
DifficultyBeginner
Time Limit1h 30m
Students5926
Ratings
4.2/5
starstarstarstarstar-half

Description

Knowing how to work with and manipulate Python Strings is an essential and important coding skill that needs to be mastered!

This lab is designed to show you how to work with and manipulate Python Strings:

  • Exercise 1 - Counting: Complete the code used to determine string lengths, and char max and mins
  • Exercise 2 - Finding: Complete the code used to search and index for character sequences within a string
  • Exercise 3 - Formatting: Complete the code used to format strings using various formatting techniques
  • Exercise 4 - Splitting: Complete the code used to split, join, partition, and replace strings

Note: Each exercise has a provided solution to consult with when needed.

Lab Objectives

Upon completion of this lab, you will be able to:

  • Write Python code to manage and maintain strings
  • Use the terminal to launch and debug Python scripts

You should:

  • Be comfortable with using a browser-based IDE

Lab Environment

This lab will start with the following AWS resources provisioned automatically for you:

  • A single EC2 instance, named ide.python.platform.instance, which will have a public IP address attached. This instance will host a web-based Python IDE (based on the Visual Code editor).

To achieve the lab end state, you will be walked through the process of:

  • Using your local browser, access the web-based Python IDE served from the ide.python.platform.instance
  • Completing the following lab exercises:
    • Exercise 1 - Counting
    • Exercise 2 - Finding
    • Exercise 3 - Formatting
    • Exercise 4 - Splitting

Updates

January 3rd, 2022 - Added further explanation in the code for find.py 

About the Author
Students126431
Labs66
Courses113
Learning paths180

Jeremy is a Content Lead Architect and DevOps SME here at Cloud Academy where he specializes in developing DevOps technical training documentation.

He has a strong background in software engineering, and has been coding with various languages, frameworks, and systems for the past 25+ years. In recent times, Jeremy has been focused on DevOps, Cloud (AWS, Azure, GCP), Security, Kubernetes, and Machine Learning.

Jeremy holds professional certifications for AWS, Azure, GCP, Terraform, Kubernetes (CKA, CKAD, CKS).

Covered Topics