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
What programs are most likely affected by a macro virus?
Iteru [2.4K]

Answer:

Macro viruses usually infect Microsoft Office apps like Word and Excel.

Explanation:

7 0
2 years ago
The most important form of nonverbal communication during a presentation is PowerPoint.
denis-greek [22]
It could also be eye contact
6 0
3 years ago
Output the following 21%4​
Vadim26 [7]
21%4 is 1.

21-4=17
17-4=13
13-4=9
9-4=5
5-4=1
4 0
3 years ago
Bailey enjoys working with her hands. She wants to choose a career path that would allow her to create things. Which career woul
WARRIOR [948]
Carpenter


sculptor

considering what I know from this I think these 2 career options are best suited
7 0
3 years ago
Sharon is troubleshooting a computer and wants to test the hard drive in another computer. Sharon removes the hard drive and not
andreyandreev [35.5K]

Answer:

Sharon would need a 'Molex connector' to test the hard drive she is using.

Explanation:

4 0
3 years ago
Other questions:
  • To add slides to a presentation, _____.
    12·1 answer
  • Exposing employee and customer personal data to an untrusted environment is an example of:
    9·1 answer
  • We will pass you 2 inputsan list of numbersa number, N, to look forYour job is to loop through the list and find the number spec
    12·1 answer
  • Software obtained illegally is called open-source software. true / false
    15·1 answer
  • You need to perform maintenance on a router and need to temporarily reroute traffic through another office. which would be the b
    6·1 answer
  • What type of engineer is needed in the following scenario?
    7·2 answers
  • During which part of an examination are various body parts and organs touched and felt?
    15·1 answer
  • What can happen if you do not follow the directions of medicine or the directions from the doctor? (Give 4 examples)​
    15·1 answer
  • ASAP PLS HELP: I’ll give brainliest if you u answer them all correctly!!
    12·2 answers
  • Using language c, find the nth Fibonacci, knowing that nth Fibonacci is calculated by the following formula: - If n = 1 Or n = 2
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!