Hello all This one the best python basic lecture you will ever get, In the entire video she never asked for subscribe or like. Let’s encourage her to do more courses like this and help crores of students and learner’s. Keep up the good work Shraddha and keep on helping people.
@@neonblade209 I want to learn machine learning thats why I chose python so there is any way you can tell where I can learn DSA because leetcode and all other platforms doesnt start from basic It would be great help if you help me with this
The r+ does not always add the data at the beginning. its totally depends where the cursor is like if we use the read command and then write so in this case after reading data the cursor will be in the end and if then we use the write command then the new data will be added to the end of file: For example in this case: f = open("test.txt" , "r+") content = f.read() f.write("john" ) f.close() : now in this case "john" will be added to the end of file. so remember the cursor is not always in the beginning in r+ mode its totally depends what you have done before that line of code. Happy coding😊
def replace("Java" , "python"): with open ("practice2.txt", "r" ) as f : date= f.read() n_data= data.replace("Java" , "python" ) print(n_data) with open("practice2.txt", "w"): f.write(n_data)
I wanted to point out that while the code used to import data from another file and count all the even numbers (without using the split function) was functioning, there is a serious bug. The issue is that you will never get the ending value because there is no comma to separate it. This can be fixed with a little tweak, but I thought it's good if I let everyone know.
00:01 Today we will cover Chapter Seven about file operations. 02:07 RAM is volatile memory and not suitable for permanent storage 06:02 Using physical files in day-to-day operations 08:25 Opening a file in read mode returns a text IO wrapper 13:18 Understanding file reading modes 15:23 Reading a file and printing its contents 19:13 Appending data to a file in A mode 21:17 Differences between different modes 25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus 27:19 Using the 'with' syntax in Python automatically closes the file 31:48 We can delete any file by using the remove function in the os module. 34:24 Replace Java with Python in a file using the replace method. 38:59 Write a function to find the line number of the word 'learning' in a file. 41:02 The code checks if a word exists within a given data string and prints the line number if it does. 45:28 Extract individual numbers from a string and convert them to integers 47:20 The code splits a string of numbers separated by commas and prints them individually. Crafted by Merlin AI.
There is one thing Maan Shradha forgets to mention is that if anyone passes the path of a text file to the first parameter of the open function, so if you just copy and paste the path as it is in the double quotes, Python will give an error because in the path there are back slashes (\), and python treated back slashes as an escape sequence character. So to fix this, there are many options, but I find these two easy; either u can put r before the first double quote and so python will treat the path as a raw string or u can replace all single back slashes with double back slashes(\\) and so python will treat this as a normal back slash rather then treating it as a escape sequence character.
I am from Pakistan and i am learning frontend development by watching your tutorial. you are doing absolutely great work. html css js ho gae ab react.js ka course kab aey ga
37:07 WAF to find all the occurrences of any given word. def check_for_word(word): line_no=1 occurrence=[] with open("practice.txt","r") as f: for line in f: if word in line: occurrence.append(line_no) line_no+=1 if occurrence: print(f"the word {word} was found at lines:, {occurrence}") else: print(f"the word {word} was not found in the file") check_for_word("Python")
write a program to convert the sequence of number into type of integer ----------- with open('read_num.txt', 'r') as f: read_file = f.readline() split_stream = read_file.split(",") int_converted_val = [] for num in split_stream: number = int(num) int_converted_val.append(number) print(int_converted_val)
WAP to find the word which we find the I/O streamed file ------------------- def fun(): with open('read_file.txt',"r") as f: word = 'dogs' data = True line = 1 while data: data = f.readline() if(word in data): print(line) return line += 1 fun()
Loving your content mam, I've been learning from you for so long and you make it very easy to grab a good hold on the concept, please if possible, extend this series by adding data analysis videos using numpy pandas, I'm a data enthusiast and building a career in data field. It'll be really helpful if you can add these concepts as well, and as you said you also wish to give a tutorial on machine learning, I will definitely wait for your ML videos.
def check_for_line (n): line_no = 1 with open("practice.txt", "r") as f: for line in f: if line.find (n) != -1: print (line_no) return line_no += 1 return ("not found") print(check_for_line("hi"))
def search(): with open('practice.txt','r') as f: line1=f.readline() line2=f.readline() line3=f.readline() line4=f.readline() if 'learning' in line1 or line2 or line3 or line4: print('found')
some pls help me when i write replace at 36:20 it is showing new_data = data.replace("Java", "Python") ^^^^^^^^^^^^ AttributeError: 'builtin_function_or_method' object has no attribute 'replace' pls help me
If we go with the traditional method, what if the last no after comma is even no. In that case last no will not come in num bcoz there is no comma after that & we can't check even for it Ps: last ques of the video
32:57 Practice Question 1 ---------> with open("practice.txt", "w") as f: f.writelines("Hi everyone, We are learning File I/O using Java. I like programming in Java.")
mam , while replacing the word java to python , and after that the file should be overwritten, but when i was writing the code the file is not being overwritten but the new file is being created , which should not happen right?how should i come over this error.
Ma'am if I run the "write command in VScode " it is not working. What should I do? Pls help... when I run the write command the text in the txt file is not overwriting as you said.... the text remains the same. Pls help..... 🙏🏽🙏🏽
00:01 Today we will cover Chapter Seven about file operations. 02:07 RAM is volatile memory and not suitable for permanent storage 06:02 Using physical files in day-to-day operations 08:25 Opening a file in read mode returns a text IO wrapper 13:18 Understanding file reading modes 15:23 Reading a file and printing its contents 19:13 Appending data to a file in A mode 21:17 Differences between different modes 25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus 27:19 Using the 'with' syntax in Python automatically closes the file 31:48 We can delete any file by using the remove function in the os module. 34:24 Replace Java with Python in a file using the replace method. 38:59 Write a function to find the line number of the word 'learning' in a file. 41:02 The code checks if a word exists within a given data string and prints the line number if it does. 45:28 Extract individual numbers from a string and convert them to integers 47:20 The code splits a string of numbers separated by commas and prints them individually.
Hello all
This one the best python basic lecture you will ever get,
In the entire video she never asked for subscribe or like.
Let’s encourage her to do more courses like this and help crores of students and learner’s. Keep up the good work Shraddha and keep on helping people.
Mam! this line is very motivational for me that you mentioned in start that "All power is within you you can do anything and everything"
Shradha di please cover all the Topics from 0 to 100 and please start DSA with Python 🙏
better to start DSA with Java or c++, becoz u will get more resources in java and c++ , dont start DSA with python
@@neonblade209 AI and machine learning is better un python i guess
@@KumarHarsh-qu3fk you're right
@@neonblade209 I want to learn machine learning thats why I chose python so there is any way you can tell where I can learn DSA because leetcode and all other platforms doesnt start from basic It would be great help if you help me with this
@@CraftAndCodee search for codebasics DSA playlist
The r+ does not always add the data at the beginning. its totally depends where the cursor is like if we use the read command and then write so in this case after reading data the cursor will be in the end and if then we use the write command then the new data will be added to the end of file: For example in this case: f = open("test.txt" , "r+")
content = f.read()
f.write("john" )
f.close() : now in this case "john" will be added to the end of file. so remember the cursor is not always in the beginning in r+ mode its totally depends what you have done before that line of code. Happy coding😊
36:42
def replace(old_string, new_string):
with open("practice2.txt","r") as f:
data=f.read()
n_data = data.replace(old_string, new_string)
print(n_data)
with open("practice2.txt","w") as f:
f.write(n_data)
replace("Java","Python")
def replace("Java" , "python"):
with open ("practice2.txt", "r" ) as f :
date= f.read()
n_data= data.replace("Java" , "python" )
print(n_data)
with open("practice2.txt", "w"):
f.write(n_data)
please create a series for AI, ML && Neutral Networks and cover all the topics.
Ys ma'am please 🥺
Ys ma'am please 🥺
yes ma'am please create the playlist for ai ,ml and neural network
Yes ma'am
comment on apnacollege for this letest video
Thanks didi from bottom of my heart for this awasome python series.
0:13
this series is most helpful for me ..thanks to shradhaa mam
The example of Shaktimaan was the best example 👌.
very intellgently teaching python. I really admire her, as I have seen one of other tutorial but that was insufficient and incomplete. Nice
I wanted to point out that while the code used to import data from another file and count all the even numbers (without using the split function) was functioning, there is a serious bug. The issue is that you will never get the ending value because there is no comma to separate it. This can be fixed with a little tweak, but I thought it's good if I let everyone know.
00:01 Today we will cover Chapter Seven about file operations.
02:07 RAM is volatile memory and not suitable for permanent storage
06:02 Using physical files in day-to-day operations
08:25 Opening a file in read mode returns a text IO wrapper
13:18 Understanding file reading modes
15:23 Reading a file and printing its contents
19:13 Appending data to a file in A mode
21:17 Differences between different modes
25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus
27:19 Using the 'with' syntax in Python automatically closes the file
31:48 We can delete any file by using the remove function in the os module.
34:24 Replace Java with Python in a file using the replace method.
38:59 Write a function to find the line number of the word 'learning' in a file.
41:02 The code checks if a word exists within a given data string and prints the line number if it does.
45:28 Extract individual numbers from a string and convert them to integers
47:20 The code splits a string of numbers separated by commas and prints them individually.
Crafted by Merlin AI.
It's really helping for students. The way you are providing knowledge in an easy and simple way.
Thanks a lot maam for teaching us simply and clearly, in an understandable way. Hare krishna !
for those who not getting that where to write pip install command please write that command in your terminal 31:49 and all set
I am facing the issue in starting, demo.txt file does not print , only print the type demo.txt, could you please tell me how to fix this problem?
thank you amazing lecture yet again, last part practice question was amazing cleared all my doubt but need to practice more
28:21 shaktimaan & gangadhar
Hi mam kitna aachha pdhati hai aap thank you so much
10:24
mam string is not printing only the type is printing
same problem with me
same problem with me
bhai log
minimize kar ke karne ke bad ho raha hai
with every change in demo.txt
i ahve to Minimize VSC
@@BowlNest bhai log
minimize kar ke karne ke bad ho raha hai
with every change in demo.txt
i ahve to Minimize VSC
@@RahulSingh-ml9hg bhai log
minimize kar ke karne ke bad ho raha hai
with every change in demo.txt
i ahve to Minimize VSC
There is one thing Maan Shradha forgets to mention is that if anyone passes the path of a text file to the first parameter of the open function, so if you just copy and paste the path as it is in the double quotes, Python will give an error because in the path there are back slashes (\), and python treated back slashes as an escape sequence character. So to fix this, there are many options, but I find these two easy; either u can put r before the first double quote and so python will treat the path as a raw string or u can replace all single back slashes with double back slashes(\\) and so python will treat this as a normal back slash rather then treating it as a escape sequence character.
Understood everything but at 48:20 the last number in the data isn't printed as there was no "," after the no. 101
Construct a program which accepts a sequence of words separated by whitespace as file input. Print the words composed of digits only.
@shradhaKD mam please
I LIKE your confidence mam/didi.
You are doing too good.
it will be great for students if you start DSA with Python...
36:59
with open("kt.txt","r") as k:
data = k.read()
if "learning" in data:
print("found")
else:
print("not found")
MAM 28:21 *Gangadhar
Ma'am please cover projects in this python series as you did in JS series please ❤❤❤
Ha
...
Ek projects ke sath me use kishe karna hai ye bhi Sikh lenge
To ek projects to karna padega
Thankyou ma'am for the lecture !
We will be really grateful if you teach us DSA USING PYTHON !
🙏
I am from Pakistan and i am learning frontend development by watching your tutorial. you are doing absolutely great work. html css js ho gae ab react.js ka course kab aey ga
congrats
Practice question- 32:55
I have a no computer no laptop and i learn coding
Thank you so much didi. ❤
37:07
WAF to find all the occurrences of any given word.
def check_for_word(word):
line_no=1
occurrence=[]
with open("practice.txt","r") as f:
for line in f:
if word in line:
occurrence.append(line_no)
line_no+=1
if occurrence:
print(f"the word {word} was found at lines:, {occurrence}")
else:
print(f"the word {word} was not found in the file")
check_for_word("Python")
Mujhe kafi mn tha, python sikhne ka , ye bahut hi unique vedio hai Mam
I am the 1st viewer of this video
write a program to convert the sequence of number into type of integer
-----------
with open('read_num.txt', 'r') as f:
read_file = f.readline()
split_stream = read_file.split(",")
int_converted_val = []
for num in split_stream:
number = int(num)
int_converted_val.append(number)
print(int_converted_val)
This series is one of the best series for learning python, easy learning with didi but apne Gangadhar ko Vidyadhar bna Diya lol :)
😄
WAP to find the word which we find the I/O streamed file
-------------------
def fun():
with open('read_file.txt',"r") as f:
word = 'dogs'
data = True
line = 1
while data:
data = f.readline()
if(word in data):
print(line)
return
line += 1
fun()
Ma'am, The vs code is showing empty lines in output even when using the read() function for the first time. what's the reason for this?
bro save your previous txt file, then it will show output.
Loving your content mam, I've been learning from you for so long and you make it very easy to grab a good hold on the concept, please if possible, extend this series by adding data analysis videos using numpy pandas, I'm a data enthusiast and building a career in data field. It'll be really helpful if you can add these concepts as well, and as you said you also wish to give a tutorial on machine learning, I will definitely wait for your ML videos.
Kab se wait kr rha tha chapter 7 ka
def check_for_line (n):
line_no = 1
with open("practice.txt", "r") as f:
for line in f:
if line.find (n) != -1:
print (line_no)
return
line_no += 1
return ("not found")
print(check_for_line("hi"))
Dsa with c
Please made playlist of advance java concepts
awesome lecture didi 🙌
26:22
modes
Shaktiman is gangadhar not vidhyadhar ma'am😂 @28:20
Thank you so much didi for your efforts 👍.
Literally enjoy studying coding via you & inspired by ur efforts 😊.
Attendance ☑️
I'm waiting = 8th video 🧑💻🧑💻
I'm waiting = 8th video🧑💻🧑💻
^
SyntaxError: unterminated string literal (detected at line 1)
@@BizAutomate😂
😂@@BizAutomate
We love your classes,
Please make video lecture on pygame development 😢
Its our request
Vote for lectures on pygame
👇
def search():
with open('practice.txt','r') as f:
line1=f.readline()
line2=f.readline()
line3=f.readline()
line4=f.readline()
if 'learning' in line1 or line2 or line3 or line4:
print('found')
else:
print('1')
search()
tumne yeto print nhi kerwaya ke kis line mai found hoa ?
its very help lectures
দিদি C++ এর একটা সিরিজ বানান।
আপনার সমস্ত ভিডিও গুলি খুবই সাহায্যকারী হয়। 😊😊😊
Didi Exception handling in python !! par bhi video banayiye please 🙏❤❤❤❤
Mam please one shot on react js
please upload all lectures of python , your way of teaching is amazing , i request you to upload all lectures
First 🥇 like and comment and viewer
some pls help me when i write replace at 36:20 it is showing
new_data = data.replace("Java", "Python")
^^^^^^^^^^^^
AttributeError: 'builtin_function_or_method' object has no attribute 'replace'
pls help me
If we go with the traditional method, what if the last no after comma is even no. In that case last no will not come in num bcoz there is no comma after that & we can't check even for it
Ps: last ques of the video
Please di API or Libraries bhi pada Dena 🙏
DiDi 🙋 Ek Simple Si Request Hai
Aap VS Code Windows Par Lecture Diya Karo.
MacOS Me Thik Nhi Lagta.
This is another type confusion with MacOS.
32:57 Practice Question 1 --------->
with open("practice.txt", "w") as f:
f.writelines("Hi everyone,
We are learning File I/O
using Java.
I like programming in Java.")
ARE YAAR DIDI PLEASE *FLASK, PANDA , MATPLOTLIB* etc bhi video bnaao please 🙏🙏
Thank you so much for the awesome videos your knowledge definitely help to clear the problems 😊😊
I have not a laptop and PC but still learning
How ????
For me this class is not running on VS code,
but working on Jupyter.
why is it so.
Thanks a Lot Mam😍
kya shaktiman hi vidhyadhar hai? or vidhyadhar hi shaktiman hai to gangadhar kaun hai?(28:20)
focus on programing
Thanks mam 😊
Shradha mam please make a one shot on REACT JS.
Python lover❤
Thanks you shhh❤ radha ❤
Waiting for Next lecture 😸
i completed 9 vedios in one day so interesting teachinng please teach also flask and Django in depth
I have not a laptop and PC. I am learning coding by android
How
@Root3659 Because my workspace is "Pydroid 3-IDE for Python"
This is difficult than recursion
We cannot understand without executing it
7th lecture done😁😁😁😁😁😁
madam in practicle question 1 instead of using
can we use multiline string quotes(tripple quotes ) as it is provinding the same output
I didn't understand 38:00 where she writes "!= -1". Can someone explain.
same, whats that -1
Cute smile 😁
mam , while replacing the word java to python , and after that the file should be overwritten, but when i was writing the code the file is not being overwritten but the new file is being created , which should not happen right?how should i come over this error.
Ma’am, plz make a playlist for NLP!
No credible information for NLP and computational linguistics.
thank you for the course it helps me a lot
Please, make one video on decorators
Thank you so much mam
@ShradhaKhapra can you teach us regular expression in python GUI Thread Date and time database management using python
can you also pls make something like this for specific libraries like numpy and datetime
What is file text bold,underlines
Wow.... From today my view will be different to see a file.
Thank you for this lecture ❤ I very happy to learning at 9th 😊😊🎉
Oops concepts Tak hee hai aage bhi karaoge kya python ?
Ma'am if I run the "write command in VScode " it is not working. What should I do?
Pls help... when I run the write command the text in the txt file is not overwriting as you said.... the text remains the same. Pls help..... 🙏🏽🙏🏽
I love you shradha mam❤❤❤❤❤❤❤
It nice course for us
why you don 't made video on exceptional handling, NumPy and the other topic
00:01 Today we will cover Chapter Seven about file operations.
02:07 RAM is volatile memory and not suitable for permanent storage
06:02 Using physical files in day-to-day operations
08:25 Opening a file in read mode returns a text IO wrapper
13:18 Understanding file reading modes
15:23 Reading a file and printing its contents
19:13 Appending data to a file in A mode
21:17 Differences between different modes
25:09 Different file modes in Python: Read Plus, Write Plus, Append Plus
27:19 Using the 'with' syntax in Python automatically closes the file
31:48 We can delete any file by using the remove function in the os module.
34:24 Replace Java with Python in a file using the replace method.
38:59 Write a function to find the line number of the word 'learning' in a file.
41:02 The code checks if a word exists within a given data string and prints the line number if it does.
45:28 Extract individual numbers from a string and convert them to integers
47:20 The code splits a string of numbers separated by commas and prints them individually.
kuch jyada hi free baitha h bhai tu😂😂😂
Jai mata di
I will keep commenting untill you make a video on REACT JS.
9:25