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
How can you achieve an effect like that shown in the image
Naily [24]
You can go into your bedroom on a dark night, then close your eyes, and press your face into the pillow. You will then see an exact copy of the image, in perfect detail.
8 0
3 years ago
Read 2 more answers
How to write conclusion of hard disk​
sergeinik [125]

Answer:

el disco duro es un componte de almacenamiento de una pc, su uso es de guardar archivos también como el sistema operativo de ejemplo :linux, window ,mac etc

Explanation:

7 0
2 years ago
Who would like to join a team devoted to decreasing spam and bullying?
Tema [17]
Yes i would love to help the cause <span />
6 0
3 years ago
An array of integers can be assigned to a memory address in the ...
fenix001 [56]

Answer:

A :)

Explanation:

8 0
2 years ago
What is a small handheld computer that performs simple tasks such as taking notes, scheduling appointments, and maintaining an a
antiseptic1488 [7]

is a small handheld computer that performs simple tasks such as taking notes, scheduling appointments, and maintaining an address book and a calendar PDA.

<h3><u>Explanation:</u></h3>

Personal Digital Assistant is the full form for PDA. PDAs are the computers in smaller size. They perform all works that are performed by a computer. They help you in viewing all the documents that you need, scheduling all your works,etc. They act as a mini sized computer that you can take where ever you go.

Using PDAs you can easily schedule any tasks, take notes, maintain all your contacts in address books,etc. Even though the markets of PDAs is not having higher demands because of the existence of i phones and other devices that are identical to i phones, there are still some usages and demands for PDAs. These are used in industries and businesses.

3 0
3 years ago
Other questions:
  • You use_____ to view an XPS file
    10·1 answer
  • What are some measurements used to determine water waste from leaking faucets?
    10·1 answer
  • Match each storyboarding technique with its appropriate description
    9·1 answer
  • Which word in brackets is most opposite to the word in capitals? PROSCRIBE (allow, stifle, promote, verify)​
    14·2 answers
  • The optional feature in a business letter is
    10·1 answer
  • Consider a channel that can lose packets but has a maximum delay that is known. Modify Protocol rdt2.1 to include sender timeout
    11·1 answer
  • Dedicated server hosting and dedicated web dedicated is the same ??????
    14·1 answer
  • Simplify 0.2×0.03055 to 3 decimal places​
    15·2 answers
  • What are the two types of electronic components
    15·2 answers
  • Which code snippet is the correct way to rewrite this in Semantic HTML?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!