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
valkas [14]
3 years ago
9

There is a file of a few Sean Connery movies on the internet. Each entry has the following form:

Computers and Technology
1 answer:
natulia [17]3 years ago
3 0

Answer:

filename = input("Enter file name: ")

movie_container = list()

with open(filename, "r") as movies:

   content = movies.readlines()

   for movie in content:

       holder = movie.split("\t")

       movie_container.append((holder[0], holder[1], holder[2], holder[3]))

movie_container = sorted(movie_container, key= lambda movie: movie[0])

for movie in movie_container:

   movie_stars = movie[3].split(",")

   name_split = [names.split(" ") for names in movie_stars]

   movie_stars.clear()

   name_split = sorted(name_split, key= lambda names: names[1])

   for name in name_split:

       full_name = " ".join(name)

       print( full_name)

       movie_stars.append(full_name)

   movie[3] = movie_stars

print(movie_container)

Explanation:

The python code uses the open function to open and read in the input file from the standard user prompt. The title of the movies and the stars are all sorted alphabetically and display at the output.

You might be interested in
The technology dealing with robots is called
Alisiya [41]
<h2> Robotics </h2>

Robotics is a field of engineering that deal with design and application of robots and the use of computer for their manipulation and processing. ... Robotics requires the application of computer integrated manufacturing, mechanical engineering, electrical engineering, biological mechanics, software engineering.

4 0
2 years ago
_____is used to organize and modify the properties of the current selection.
vova2212 [387]

Answer:

<h3>☘ QUESTION☘</h3>

_____is used to organize and modify the properties of the current selection.

<h3>☘ ANSWER☘</h3>

(B) Property Inspector

Explanation:

✨BY#NICHOLE✨

4 0
2 years ago
Can anybody tell me how to screenshot on a PC with no "print screen" button?
Liono4ka [1.6K]

There is a extension from google chrome webstore that allows to take a screnshot

8 0
3 years ago
Do you watch markiplier?
ki77a [65]

Answer: Yes

Explanation: He is cool

5 0
3 years ago
Read 2 more answers
Help me guys pleassssssssse​
Readme [11.4K]

Answer:

is there a word bank??

Explanation:

8 0
2 years ago
Other questions:
  • What is computer virus?
    8·1 answer
  • Which is the most efficient way to italicize a row of text in every worksheet in a workbook?
    8·1 answer
  • The protocol that enables computers on the Internet to communicate with one another is called _____.
    10·2 answers
  • This type of connection uses radio waves to connect devices on a network.
    15·2 answers
  • Why would a brokered CD pay more than a regular CD?
    13·1 answer
  • Which of the following code segments does not contain any errors?
    7·1 answer
  • Create a class named Invoicing that includes three overloaded computeInvoice() methods for a book store: see pages 196 for examp
    7·1 answer
  • Scenario
    7·1 answer
  • A group of students writes their names and unique student ID numbers on sheets of paper. The sheets are then randomly placed in
    15·1 answer
  • Type the correct answer in the box
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!