1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
bekas [8.4K]
3 years ago
11

If my_string = "This is MY string!", why does print (my_string[0:7:5]) return "Ti" and not

Computers and Technology
1 answer:
notka56 [123]3 years ago
7 0

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.

You might be interested in
Need answer ASAP
kaheart [24]

Answer:

D. To ensure that the software adheres to technical standards

Explanation:

The responsibility of the software architect is to ensure that all parts of the software system are able to meet the requirements set forth by the project or specifications, in this case, the technical standards.  This is an important piece of the software system because without it, the software system may not perform the necessary functions that it was written to do.

Cheers.

5 0
3 years ago
What was the first carbonated drink to be introduced in the US?
adelina 88 [10]
Taco bell...........................................................................................................................................................................

6 0
3 years ago
A _____________ is designed for a individual user.
pishuonlain [190]

Answer:

i don't know it sorry

Explanation:

7 0
3 years ago
Karlie wants to eat a good breakfast before taking a test
babymother [125]
Yum sounds like a good idea
7 0
3 years ago
Read 2 more answers
Type the correct answer in the box. Spell all words correctly.
trasher [3.6K]

syntax are programming languages that specify a series of structured functions. C is an example of such a language.

7 0
3 years ago
Other questions:
  • What does “int” means in php code
    13·1 answer
  • What is the best operating system
    12·1 answer
  • On which of the following pointing devices can you control the pointer by sliding your fingertip?
    11·1 answer
  • ITS MAKING ME TYPE URL CODES NOW!
    6·1 answer
  • What is the gauge manifold made of
    14·1 answer
  • How do assignment article computer security, ethics and privacy?
    15·1 answer
  • Which componet is the smallest unit in a spreadsheet
    15·1 answer
  • Kamal plans to offer new, more favorable contracts to business customers who are now receiving a discount and use wireless servi
    7·1 answer
  • How does information promote cooperation and Industry please explain​
    6·1 answer
  • Which button on a desktop computer begins a reboot of the computer without power being removed from the computer's components?
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!