In Python, a string is an array of characters, we can access these characters using index operator []. For example, we have a_string = "Hello World" a_string[0] prints the first character in string ('H').
We can also use index operator to make substrings, for example a_string[0:3] will make a substring with first, second, third and fourth character equal to "Hell".
Now to business
my_string = "This is MY string!"
print(my_string[0:7]) # Prints "This is "
print(my_string[0:7:5]) # Prints "T" then prints the sixth character since we start counting at 0 hence prints "Ti" (note that space is also a character).
Hope this helps.
It’s 34....!!!! i did this before
Answer:
Khan Academy is the best app for education, you can watch videos and do quizes
Answer:
True
Explanation:
it's your perfect answers
Because trends can show data in relation to what career is on the rise in terms of wages, statistics show patterns that you can observe to find the career which is becoming popular and most beneficial.