Python Tutorial : CHAPTER 1 Start programming using strings.


CHAPTER 1: Start programming using strings.
I personally think that Python has been created for make your life
easier because this programming language uses a lot of elements that
have other programming languages and combines them in a single one, but
more powerful and easy to use. Let’s start our programming exercises
using strings.

What is a String?
An easy explanation about strings is that embraces a sequence of
alphabetical characters. For instance: [abcdefghijk] and
[lmnopqrstuv]. Here we have two different strings. The fist one
contains 11 characters and the second one has 11 characters too. It is
what we call string. Also, a string is a data type that commonly can
accept letters and numbers even though you won’t be able to make
arithmetical operations with those numbers. You only can do that
changing the data type for a numeric type. The strings are the basic
unit of text when you use Python.
1. Now we are going to see how strings operate in Python. Open the
Python Shell where you will see a window similar to this:

2. Then write the following:
>>> “you can’t do anything with this text”
3. Press ENTER and you will see in your IDLE:

4. At last, you can see minimally how easy strings work in Python. You
can test with other examples and also take advantage of the forthcoming
examples about strings.

You can leave a response, or trackback from your own site.

Leave a Reply

You must be logged in to post a comment.