Create a String using Single Quotes

To create a string using single quotes in Python, enclose the string value in single quotes, with a single quote before the string value, and a single quote after the string value.

In the following example, Hello World is string value. To specify this value as a string literal in Python, we use single quotes, as shown in the following.

'Hello World'

We may assign this value to a variable as shown in the following.

message = 'Hello World'