file searching in python
with open('largeFile', 'r') as inF:
for line in inF:
if 'myString' in line:
# do_something
file searching in python
with open('largeFile', 'r') as inF:
for line in inF:
if 'myString' in line:
# do_something
find a file in python
import os
def find(name, path):
for root, dirs, files in os.walk(path):
if name in files:
return os.path.join(root, name)
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us