Navigation X
ALERT
Click here to register with a few steps and explore all our cool stuff we have to offer!




   1376

[Help] Need help with my Python code

by TrynaStop - 10 July, 2020 - 04:59 PM
This post is by a banned member (TrynaStop) - Unhide
TrynaStop  
Registered
256
Posts
9
Threads
7 Years of service
#1
I've new-ish to coding in python, I made a simple Username checker using Re and requests, it only works for singular input at the moment and I got this completely working but now I'm trying to integrate a feature so I can upload a Txt file of names to check instead of manually checking I can PM my code because I don't want it public out there. but this will be released for Free when done :)

Any help is appreciated
This post is by a banned member (Lestavol) - Unhide
Lestavol  
Registered
14
Posts
0
Threads
6 Years of service
#2
You can read from a file using the open() function, and then get the input from it with the .readlines() method.
Code:
file = open(input.txt, r)
usernames = file.readlines()
for username in usernames:
   (do whatever)
This post is by a banned member (venomz) - Unhide

Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
or
Sign in
Already have an account? Sign in here.


Forum Jump:


Users browsing this thread: 1 Guest(s)