Python Tutorial: Python String Basics - Python Basics #10

Veröffentlicht am: 26 Februar 2015
auf dem Kanal: Code master
11,321
54

In this Python Tutorial we talk about Python String Basics visit our website for more info - http://learnpythontutorial.com/python...

If you have any questions about this Python tutorial leave a comment we will help your out.

Do not forget to subscribe we post a new Python tutorial daily so you will not want to miss it.

Our website has the full Python Tutorial.

In today's Python tutorial, we are going to take a gander at an alternate critical information sort that we utilize regularly as a part of Python. We are going to concentrate on an information sort called a string. A string is a succession of information like content or a gathering of bytes. In this tutorial, we are going to just be concentrating on a prologue to the Python string. We will dive deeper into strings in part 4 of this arrangement.

What is a String?

A string contains a rundown of characters in a particular order(sequence). The characters in a string can be letters, numbers, uncommon characters like images and spaces. Strings have no restriction on to what extent they may be and you might likewise take a string that contains no characters this is known as a "void string".

What is the Python String Syntax?

The linguistic structure of a string in Python is truly basic. We make a string by encasing characters in quotes which can be single quotes, twofold quotes or triple quotes. Which strategy you utilize is totally up to you. Through out the tutorials I will be utilizing single quotes for the majority of the tutorials aside from when certain circumstances emerge where single quotes are not the best choice.

Python String Syntax

'This is a string in Python'

"This is a string in Python"

'''This is a string in Python'''

"""This is a string in Python"""

We can not begin with single quote and end with a twofold quote. We must begin and end with same kind of quote.


Auf dieser Seite können Sie das Online-Video Python Tutorial: Python String Basics - Python Basics #10 mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Code master 26 Februar 2015 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 11,321 Mal angesehen und es wurde von 54 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!