Home Coding Data Types – String

Data Types – String

0
Data Types – String

# Data Types - STRING
# Strings in Python are not strings. They are more like a list.
# A string is a sequence of characters (one or more), and 
# each character is a string himself.
# For that reason, some list methods can also be
# used in a string.
# Python uses Unicode "encoding" that supports
# up to 143.859 characters.

str1 = "I'm a string" # just plain text
str2 = 'also me!' # spot the difference, ' vs "
str3 = "Hello ✋" # Hallo Unicode ✋✋✋
str4 = "123" # Whatch, I'm a string not a number
str5 = 'That\'s strange!' # I'm an escape character \ 
                           # use me if you got trouble


OUT = (str1, str2, str3, str4, str5)