--Originally published at Python
Creating and using strings is simple. You just need to define a variable using an apostrophe. Ex: string1 = ‘Hello’
After this, you can play around with the string. You can update it, print all of it, print only some parts, etc. Here are some examples:
Code:
str1 = ‘I like dogs’
print(str1)
print(str1[0])
print(str1[7:10])
As you can see, it’s easy, you just need to understand the positioning and how everything inside of it is arranged.