Learning Python and write a program to check the contents of the letters in the text. There is such a code:
Import String MyText= Input ("Enter text to check:") N= INPUT ("Enter the letters to search:") N= N.REPLACE ("", "") SYMBS= LIST (N) Print ("We are looking for such letters:", SYMBS) For S in Symbs: IF S in MyText: Print ("The text is the letter '" + S + "') Break ELSE: Print ("In the text there is no letter '" + s + "'") ELSE: Print ("There are no such letters in the text") Print ("Search Completed")
For example: "Hello my name is Oleg" is the text for checking, and the letters "P, P, and, B, E, T" are the desired. In this case, the result of the program will be:
Enter the text for checking: Hello my name is Oleg Enter the letters to search: Hi We are looking for such letters: ['p', 'r', 'and', 'in', 'e', 't'] The text has the letter 'P' Search completion
How to make so that all the letters found were displayed
- python : django.db.utils.Operationalerror: No Such Column: main_anzeigen.rasse -nothing helps
- python : Overlaying the looped gif animation with a transparent background on video
- How to run the source with github with the parameters you need in Python code
- python : Minimize the cost of the pipeline by selection of coordinates
- python : How to customize QSLIDER in a certain way?
- python : Not sent request to the site from the server
- python : Cookies are not inserted with proxy
- python : How to find out the random value index that is defined in Head_Check
- python : How to get the desired values?
- python : Top people by rating