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
Darina [25.2K]
3 years ago
10

Write a program that reads a person's first and last names separated by a space, assuming the first and last names are both sing

le words. Then the program outputs last name, comma, first name. End with newline. Example output if the input is: Maya Jones Jones, Maya
Computers and Technology
1 answer:
Over [174]3 years ago
3 0

Answer:

Written in Python:

import re

name = input("Name: ")

print(re.sub("[ ]", ", ", name))

Explanation:

This line imports the regular expression library

import re

This line prompts user for input

name = input("Name: ")

This line replace the space with comma and prints the output

print(re.sub("[ ]", ", ", name))

You might be interested in
When listing columns in the select list, what should you use to separate the columns?
Gala2k [10]
The answer is commas.  <span>When listing columns in the select list, commas should be used to separate the columns.</span>
6 0
4 years ago
In a(n) ____________________ device, the movement of electrons performs essentially the same functions as gears and wheels in me
lana66690 [7]

Answer:

Electronic computing.

Explanation:

8 0
2 years ago
You must signal ___ before any turn or lance change ?
Alexeev081 [22]

Answer:

Your turning signal, or blinker

3 0
3 years ago
Read 2 more answers
business owners and managers may first balk at the idea of mobile officer workers because there may appear to be a lack of ___ w
Tcecarenko [31]
Business owners and managers may first balk at the idea of mobile officer workers because there may appear to be a lack of ___ when employees are not sitting at a desk in the office

Lack of control, supervision (I.e. micro-management lol).
5 0
3 years ago
True or false? The following deterministic finite-state automaton recognizes the set of all bit strings such that the first bit
aleksklad [387]

Answer:gjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj

Explanation:

7 0
3 years ago
Other questions:
  • __________ is an attempt to gain access to a network by posing as an authorized user in order to find sensitive information, suc
    5·1 answer
  • What file format is best for photo editing? Select one: a. JPG b. RAW c. DOC d. RTF
    12·2 answers
  • Because of Moore's Law, widely-used encryption programs currently employed by banks and ecommerce sites are now easily penetrate
    11·1 answer
  • What is the tallest dam in the united states of america?
    14·2 answers
  • The __________ is a center of Internet security expertise and is located at the Software Engineering Institute, a federally fund
    5·2 answers
  • LISTEN I NEED EVERY SINGLE BRAINLY USER TO RE POST THIS THERE IS A USER WHO JUST SAID THEY ARE GOING TO KILL THEMSELVES PLEASE C
    12·2 answers
  • Hubs connect network hosts in which configuration?
    7·1 answer
  • Write a python program to find factorial, use exception handling and display an appropriate message if the user inputs alphabets
    7·1 answer
  • Which of the following is a document view you can select using Button on the status bar?
    11·1 answer
  • Accessibility is the degree to which a product or service is readily available and usable by _____.
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!