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]
2 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]2 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 do I cancel a friend request?
dusya [7]

Answer:

By pushing cancel

Explanation:

It's simple

3 0
3 years ago
Read 2 more answers
I got a kahoot! Totally random pls join!<br><br> Code 08408519!
OlgaM077 [116]

Answer:

say less

Explanation:

5 0
3 years ago
Read 2 more answers
Why is it helpful hat the ribbon tabs can collapse
UkoKoshka [18]
This is helpful in order to have a larger space to work in.

Being able to collapse the ribbon gives the user a larger document to work with instead of focusing on what they’re typing as well as extra effects.

Hope this helps!
4 0
2 years ago
2.3.2 Internet Safety
REY [17]

Answer:

False

Explanation:

There are also hackers online

5 0
2 years ago
Suppose you have two RAID arrays, one implementing RAID 3, the other RAID 5. Each has 9 disk drives in its array. If the RAID 5
Snezhnost [94]

Answer:

48 is the answer

Explanation:

16×3 is the explanation for your question

8 0
3 years ago
Other questions:
  • Elisa and josh need to access general helps. Elisa will press the F1 key. josh will on ?. who will access general help
    15·1 answer
  • In c++
    9·1 answer
  • On which tab are import and export commands located in Access? A. Home B. Database Tools C. External Data D. Create
    13·1 answer
  • Individuals with desirable traits will be __________ to have young that survive than individuals without these traits. (2 points
    5·2 answers
  • The primary reason for the creation of the Federal Reserve System LOADING... ​was: A. to create a single central bank similar to
    7·1 answer
  • Mary can view the thumbnails of her presentation slides when she’s creating the slides which element of the programs interface i
    8·1 answer
  • Free points,
    15·2 answers
  • B. List any four major drawbacks of the first generation computer​
    10·1 answer
  • If a folder exists on an NTFS partition, which permission is needed by a user who needs to set security permissions on the folde
    11·1 answer
  • Read the statement and justify your answer. “ICT is important for every field.”
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!