Modify short_names by deleting the first element and changing the last element to Joe. Sample output with input: 'Gertrude Sam Ann Joseph' ['Sam', 'Ann', 'Joe']

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter18: Stacks And Queues
Section: Chapter Questions
Problem 18PE
icon
Related questions
Question

Modify short_names by deleting the first element and changing the last element to Joe.

Sample output with input: 'Gertrude Sam Ann Joseph'

['Sam', 'Ann', 'Joe']

< >
learn.zybooks.com
b Search results for 'Write a function shampoo_instructio...
ży Section 6.1 - IT 140: Introduction to Scripting v3
B Grades - IT-140-J6169 Introduction to Scripting 21EW6...
* Search Results | Course Hero
= zyBooks My library > IT 140: Introduction to Scripting v3 home > 6.1: Lists
E zyBooks catalog
? Help/FAQ 8 Victoria Thibodeaux
True
List concatenation appends the right operand to the left
operand and creates a new list with the result.
O False
Feedback?
CHALLENGE
6.1.1: Modify a list.
АCTIVITY
Modify short_names by deleting the first element and changing the last element to Joe.
Sample output with input: 'Gertrude Sam Ann Joseph'
['Sam', 'Ann', 'Joe']
247772.1992070.qx3zqy7
1 user_input
2 short_names =
input()
user_input.split()
1 test
passed
3
4
'' Your solution goes here '''
All tests
6 print(short_names)
passed
Run
Transcribed Image Text:< > learn.zybooks.com b Search results for 'Write a function shampoo_instructio... ży Section 6.1 - IT 140: Introduction to Scripting v3 B Grades - IT-140-J6169 Introduction to Scripting 21EW6... * Search Results | Course Hero = zyBooks My library > IT 140: Introduction to Scripting v3 home > 6.1: Lists E zyBooks catalog ? Help/FAQ 8 Victoria Thibodeaux True List concatenation appends the right operand to the left operand and creates a new list with the result. O False Feedback? CHALLENGE 6.1.1: Modify a list. АCTIVITY Modify short_names by deleting the first element and changing the last element to Joe. Sample output with input: 'Gertrude Sam Ann Joseph' ['Sam', 'Ann', 'Joe'] 247772.1992070.qx3zqy7 1 user_input 2 short_names = input() user_input.split() 1 test passed 3 4 '' Your solution goes here ''' All tests 6 print(short_names) passed Run
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Graphical User Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning