Python – String Methods

String Methods

Python has a set of built-in methods that you can use on strings.

Note: All string methods return new values. They do not change the original string.

Continue reading Python – String Methods

Python Strings

Strings

Strings in python are surrounded by either single quotation marks, or double quotation marks.

‘hello’ is the same as “hello”.

You can display a string literal with the print() function:

Example

print("Hello")
print('Hello')

Quotes Inside Quotes

You can use quotes inside a string, as long as they don’t match the quotes surrounding the string: Continue reading Python Strings