Advertisement
Arcot

ch6 ex5

Nov 27th, 2021
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. response=""
  2. ids=[]
  3. while not response=="exit":
  4.   response=input("Enter email ids")
  5.   if response.count('@')==1 and response.count('.')==1:
  6.     ids.append(response)
  7.   elif response=="exit":
  8.     print("exiting")
  9.   else:
  10.     print("enter a valid email id")
  11.  
  12. text="".join(ids)
  13. print("gmail total occurence",text.count("gmail"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement