Awesome tutorial im very slow at typing so i never had to pause and look back at it and the program was Really Really simple
@ragegod66635 жыл бұрын
Man i would like to thank you and keep doing your job. Really amazing got me out of my little chaotic world.
@SamA-jg8vy2 жыл бұрын
Great tutorial! Very well put together and clearly explained. Thanks for sharing this. I'll be watching your other tutorials as well.
@barbarasais9683 Жыл бұрын
Thanks, it was super easy to follow!!
@antejurcevic58556 жыл бұрын
Why is it important to put "mo" in squared brackets?
@hyped24766 жыл бұрын
Good question. It is because we need to pass 'mo' as an element of a list.
@alexromero45253 жыл бұрын
Thanks for making this, just used it in 2021!
@hyped24763 жыл бұрын
Right on, Alex!
@MrJestriktheJester3 жыл бұрын
@@hyped2476 Wow this video was posted 5 yrs ago?!?
@rudrashiva5 жыл бұрын
without using def. and if function>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>string = open("file_name.txt","r") x = (string.read()).lower() y = x.split().count(input("Enter the word: ")) print(y)
@yougiovesjotube4 жыл бұрын
string is not defined
@tobiashaller94793 жыл бұрын
Hey man nice tutorial How would I search for a term that consists of two words for example "Joint Venture" or "European Union"?
@hyped24763 жыл бұрын
That is a good question! I do not think that our current program accounts for this edge case. We would have to create another program to do the thing that you want.
@strexli48353 жыл бұрын
your video is incredible thanks you a lot !
@anthonyczuchaj59124 жыл бұрын
have been trying for a couple of days to get the items in a txt file to be compared with the words in an input bar but it seems to not registering if the words match or not any suggestions?
@marysanchez88784 жыл бұрын
Cheers for this, been searching for "andrea fulton solo ads" for a while now, and I think this has helped. Have you ever come across - Yanliana Feydalyn Rule - (do a search on google ) ? Ive heard some super things about it and my partner got cool results with it.
@emilgregersen35074 жыл бұрын
You should consider not doing to much in your videos. Your title is "Check if Specific Words Exist in A File" but what you actually did was: "How to count how many times a specific word exists in a file, while also making sure that your program understands it no matter how the word is written and also takes out any signs that we are not looking for" This is not Python for basics. Your title indicates a video that is python for basics, but you decided to do much more "just because" - it confuses the viewer more than it helps.
@hyped24764 жыл бұрын
Hi Greg, thank you for this. I appreciate your honest reply.
@emilgregersen35074 жыл бұрын
@@hyped2476 No worries. Was stressed when I wrote the comment, sorry for the angry tone.
@eric99734 жыл бұрын
Thanks sir. Is this applicable to Msword file too?
@bhavindedhia99685 жыл бұрын
sir I want to check for multiple words to check what to do
@hyped24765 жыл бұрын
Easy. All you have to do is to add the words that you want to check in the list. In line 22, I only have ["mo"] but you can add all the words that you want. For example, ["word1", "word2", ""]
@alkadedhia24985 жыл бұрын
@@hyped2476 Sir but if I want to go for input user it doesn't work, I had tried with .split() but didn't work. For eg I want to search keyword for multiple words than with user input what will code do help?
@lucijakrusic22784 жыл бұрын
@@hyped2476 Hi, what if I wanted to check words from another txt file?
@hyped24764 жыл бұрын
@@lucijakrusic2278 Just change the name of the file from "mo.txt" to the file that you would like to count. For example, "newFile.txt".
@lucijakrusic22784 жыл бұрын
@@hyped2476 Hi, thank you for your reply, but I was unclear - if I wanted the "listwords" to actually be a txt file which contained a list of words, where would I need to put the function for reading that file?
@shubhamjha66526 жыл бұрын
if i want get line number of a word in a text file which has multiple lines, how will i get it? (eg: "ronaldo" in line 1, line 5 .....). pls help
@hyped24766 жыл бұрын
Hi there, hmm. Well, if I were to do it, then I would use a counter. You need to track the line number that you're currently on, and when you print the word, you should print the number as well. Here is the most up to date version of the program: github.com/Hyped-247/FileCounter/blob/master/counterFile.py
@shubhamjha66526 жыл бұрын
can i use a list instead of a dictionary here?
@hyped24766 жыл бұрын
Try it out, and let me know what happens. @@shubhamjha6652
@shubhamjha66526 жыл бұрын
@@hyped2476 hi, i tried and it worked. btw i am facing issues when reading the next line after the line in which the pattern is found.
@mrmister.1014 жыл бұрын
how do u make it so it opens a pdf?
@hyped24764 жыл бұрын
I do not think this will work on a PDF. In this video, it will only work with a text file.
@RayCharles4447 жыл бұрын
thanks for the video, I'm having a bit of trouble reading the font on the screen, do you by chance have a txt file of this? Thanks!!
@hyped24767 жыл бұрын
I just looked for some old files and upload it on GitHub just for you. Here is the link: github.com/Hyped-247/file
@Battrisha5 жыл бұрын
This guy is like the Bob Ross of coding
@MCCiabattaGrande6 жыл бұрын
Man I LOVE U #nohomo
@hyped24766 жыл бұрын
You will love me more after this: github.com/Hyped-247/TK/tree/master/File%20Counter
@tamilmaranc5 жыл бұрын
excellent
@CollosalTrollge4 жыл бұрын
Subscribed and liked this video - will be checking your Python stuff out - i hope i manage to get what i want - not so complicated but i am making it harder for myself overthinking, Thanks