Python) String

강현상
Jun 28, 2021

Everything that you write inside ‘’, or “”, those are all to be categorized into strings

Can declare string like numbers, and can add different strings to one like:

setting string example

If you want to include a quotation mark or double-quotation mark, you can put a backslash(\) before ‘, or “

To change the line, you use \n:

changing line example

_________________________________________________________________

Indexing and Slicing

Indexing helps you to find which letter is in the nth position by using []: a

Indexing example

By using this technique, you can also use slicing

Slicing is to pull out a part from a sentence:

slicing example

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

강현상
강현상

No responses yet

Write a response