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
nlexa [21]
3 years ago
11

Write a program that inputs a text file. The program should print the unique words in the file in alphabetical order. Uppercase

words should take precedence over lowercase words. For example, 'Z' comes before 'a'. I am stuck on this python assignment. Don't need the answer asap, just some explaining of how to write code to do that. I know about the built in sort function
Computers and Technology
1 answer:
satela [25.4K]3 years ago
5 0

Answer:

Read the file and save it to a variable as a string, split the string variable and cast it to a set object using the set function to get the unique words in the file. Then use the max function with the key attribute to use regular expression module "re" to compare the first letter of each item to return in a list comprehension or append to a list.

Explanation:

The open function is used to import a file in python, the split string method splits the string to a list of items and the set function removes any duplicates of a word or item.

Using the for loop statement, iterate over the items and compare and return the items in alphabetical order with the 're' search method getting the item with uppercase letters with higher precedence than lowercase.

You might be interested in
Describe how data center storage applications drive the development of SAN technology.
Ede4ka [16]

Answer:

 The storage area network basically apply in the networking model for storage various application in the data center. The storage area network (SAN) provide the common pathway between the server and the storage device.

The storage area network technology basically implemented in the fiber channel configuration over the ethernet. SAN provide access to the data that shared by the personal resources. It is basically simple and dedicated network which provide for the data storage.

 

5 0
3 years ago
bailey reads wikis at the beginning of his research project to get his bearings on the topic. he switches to peer-reviewed journ
Zinaida [17]

Answer: peer-review

Explanation:

Anyone can edit wikis; while its true that they are well reviewed sometimes, there are times where vandalism can go unnoticed. Furthermore, professional publications are peer-reviewed to a much more rigorous standard. Therefore, Bailey doesn't use wikis as formal sources.

3 0
3 years ago
The company database may be stored on a central database server and managed by a database adminstrator true or false
RUDIKE [14]
The answer is True.  <span>The company database may be stored on a central database server and managed by a database administrator.  </span>
6 0
3 years ago
You have a server with two physical processors, each with four cores for a total of 8 cores. How many license packs must you buy
mafiozo [28]

Answer:

You must buy eight 2-core license packs, for a total of 16 core licenses.

Explanation:

Brainliest pls

3 0
3 years ago
What is parallelism of microinstruction
Kitty [74]
The answer is Hardware level works upon dynamic parallelism whereas, the software level works on static parallelism. Dynamic parallelism means the processor decides at run time which instructions to execute in parallel,
8 0
3 years ago
Other questions:
  • What is TCP/IP?
    13·1 answer
  • How do all apple phones work?
    7·1 answer
  • What command would you use to make a secure shell connection to the ubuntu client machine? ()?
    9·1 answer
  • While traveling in India, Sabina notes all of her daily expenses in rupees in her spreadsheet. At the end of the day, she wants
    8·1 answer
  • You should always assign the Needs Met rating before assigning the Page Quality rating, T or F ?
    6·2 answers
  • Describing Report Tools Functions
    9·1 answer
  • Note that common skills are listed toward the top, and less common skills are listed toward the bottom. According to O*NET, what
    15·1 answer
  • Why media is far from government​
    6·2 answers
  • What is most likely to happen to the purchasing power of money over time?
    5·1 answer
  • Which of the following tiny computer apps is designed to be useful but could cause more harm than good?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!