Preview lessons, content and tests

Computer Science & Programming solved. All in one platform.

1. To trial the platform and take tests, please take a few seconds to SIGN UP and SET UP FREE.
2. Searching for something specific? See our text overview of all tests. Scroll right for levels, and lists.

Join 36000+ teachers and students using TTIO.

String Manipulation

A string is just a list of characters in order. "John" is a string.

Accessing

Use [ ] to access characters in a string

word = "Hello World"
letter=word[0]
>>> print letter
H

Finding the length of a string

word = "Hello World"
>>> len(word)
11

Strings are, as we know, absolutely everywhere and Python strings are used for storing and manipulating text.

Use the following useful link to learn more about strings and string manipulation in Python

https://www.w3schools.com/python/python_strings.asp

www.teachyourselfpython.com