string function python code example
Example 1: pyhon string
my_string = 'Hello'
print(my_string)
my_string = "Hello"
print(my_string)
my_string = '''Hello'''
print(my_string)
my_string = """Hello, welcome to
the world of Python"""
print(my_string)
Example 2: strings in python
myString = "Hello world"
print(myString)
myArr = []
myArr.append(myString)
H = myString[0]
lowercase = myString.lower()
myInt = int(myString)
Example 3: Python Strings
print("Hello")
Example 4: define a string in python
string1 = "something"
string2 = 'something else'
string3 = """
something
super
long
"""