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
Ksivusya [100]
2 years ago
9

The file includes 4993 tweets including the keyword 'election'. Each tweet is represented in a separate line. Write a program to

open the file and read through its lines, then only if a tweet includes a hashtag (a term beginning by the
Computers and Technology
1 answer:
Likurg_2 [28]2 years ago
7 0

Answer:

import re

with open("../../Downloads/Tweets.txt","r", encoding="utf-8") as tweets:

   myfile = tweets.readlines()

   for item in myfile:

       item = item.rstrip()

       mylist = re.findall("^RT (.*) ", item)

       if len(mylist) !=0:

           for line in mylist:

               if line.count("#") >=1:

                   ln = line.split("#")

                   dm = ln[1]

                   print(f"#{dm}")

Explanation:

The python source code filters the document file "Tweets" to return all tweets with a hashtag flag, discarding the rest.

You might be interested in
HTML question please help
Pie

Answer:

background-color: (Color)

Explanation:

This is actually CSS coding, as you would code it like:

Body {

background-color: (Color)

}

5 0
3 years ago
Which type of network treats all processors equally, and allows peripheral devices to be shared without going to a separate serv
Elis [28]
The correct answer is P2P or peer-to-peer servers.

Hope I helped ;)
7 0
2 years ago
Suppose two hosts, A and B, are separated by 20,000 kilometers and are connected by a direct link of R = 2 Mbps. Suppose the pro
AnnZ [28]

Answer:

a. (210^6)((210^7)/(2.510^8)) = 1.610^5 bits or 160,000 bits

b. 1.6*10^5 bits or 160,000 bits

c. Bandwidth delay product of link is maximum number of bits that can be in the link

d. Width of bit = Length of link / bandwidth-delay product so 1 bit is 125 meters long. Yes, this is longer than a football field.

e. Width of bit = s/R

Hope this helps :)

3 0
3 years ago
A person interested in a career in digital media should have which qualities? Select all that apply.
emmainna [20.7K]
1.Creativity
2.Leadership
3.Attention to detail
5.Enjoyment to learning new things!
6.Vision
No Problem!
5 0
2 years ago
Employees are one of the main contributors to cybersecurity breaches because of _____? Select 3 options.
Tema [17]

Answer: inattention, lack of knowledge, and negligence.

Explanation: employees are often the cause of workplace incidents because they may be unknowledgeable about security protocols, negligent, or simply make a mistake.

5 0
2 years ago
Other questions:
  • Write a function removeEvens to remove all the even numbers from input row array inRowArray which contains integer numbers. The
    15·1 answer
  • Prevent a page break in the final paragraph of this document by keeping the lines together
    10·1 answer
  • What two different passwords can be set to lock down a computer from unauthorized access?
    13·1 answer
  • The network architecture component that is a special LAN with a group of servers that enables electronic data exchange of betwee
    8·1 answer
  • Select the correct statement(s) regarding partial mesh networks.
    5·1 answer
  • Does clicking ads and pop ups like the one shown in this image could expose your computer to malware?
    15·1 answer
  • Write the code for invoking a method named sendsignal. there are no arguments for this method . assume that sendsignal is define
    12·1 answer
  • Explain two ways by which the calendar meets or fails to meet the criteria of showing the correct data
    7·1 answer
  • A ___________ is a variable used to pass information to a method.
    11·2 answers
  • What what do these two parts of the lift do ​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!