Python Programming Masterclass 5 - Introduction to Strings - Beginner to Expert

Published: 01 July 2017
on channel: Eduard G
14
0

Python Programming Masterclass 5 - Introduction to Strings - Beginner to Expert

Strings are amongst the most popular data types in Python. You can create them simply by enclosing characters in quotes. In Python single quotes are treated the same as double quotes. Creating strings is as simple as assigning a value to a variable.

$ my_string = 'This is a string' //single quotes
$ my_string1 = "This is another string" //double quotes
$ my_string2 = """My\ //triple quotes
name\
is\
John"""

$ string1 = "Youtube"
$ len (string1) = 7 //length of the string

$string1[0] //returns the first character of the string
'Y'

$string1[-1] // returns the last character of the string
'e'


On this page of the site you can watch the video online Python Programming Masterclass 5 - Introduction to Strings - Beginner to Expert with a duration of hours minute second in good quality, which was uploaded by the user Eduard G 01 July 2017, share the link with friends and acquaintances, this video has already been watched 14 times on youtube and it was liked by 0 viewers. Enjoy your viewing!