1# ways to dfefine string in python
2string = "String"
3string = str(string)
4
5# Can Add strings
6s1 = "Str"
7s2 = "ing"
8s = s1 + s2 # "String"
1# defining strings in Python
2# all of the following are equivalent
3my_string = 'Hello'
4print(my_string)
5
6my_string = "Hello"
7print(my_string)
8
9my_string = '''Hello'''
10print(my_string)
11
12# triple quotes string can extend multiple lines
13my_string = """Hello, welcome to
14 the world of Python"""
15print(my_string)
1#A string is a type of data. There are many data types. It can be manipulated.
2#It can be storerd as a variable
3myString = "Hello world"
4#WE can print it:
5print(myString)
6#You can append it to arraY:
7myArr = []
8myArr.append(myString)
9#You can find the index of a character in a string:
10H = myString[0]
11#You can use methods on it:
12lowercase = myString.lower()
13#You can convert it into a integer provided it is a numerical string
14myInt = int(myString)
15#So thats the basics, hope i haven't left anything out.