Answer to Question #116780 in Python for Sthembiso

Question #116780
Part 1.

Write a Python code that does the following.

• Create a string that is a long series of words separated by spaces. The string is your own creative choice. It can be names, favorite foods, animals, anything. Just make it up yourself. Do not copy the string from another source.

• Turn the string into a list of words using split.

• Delete three words from the list, but delete each one using a different kind of Python operation.

• Sort the list.

• Add new words to the list (three or more) using three different kinds of Python operation.

• Turn the list of words back into a single string using join.

• Print the string.


Part 2.

Provide your own examples of the following using Python lists. Create your own examples. Do not copy them from another source.

• nested lists
• The "*" operator
• List slices
• The "+=" operator
• A list filter
• A list operation that is legal but does the "wrong" thing, not what the programmer expects
1
Expert's answer
2020-05-18T07:25:59-0400
Dear Sthembiso, your question requires a lot of work, which neither of our experts is ready to perform for free. We advise you to convert it to a fully qualified order and we will try to help you. Please click the link below to proceed: Submit order

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS