Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Querying cvs excel files
#5
thanks. I have don it but no luck so far.

        username=input("Enter Username: ")
        password=input("Enter Passwrod: ")


        with open('Usernames_Passwords.csv', newline='') as myFile:  
            reader = csv.reader(myFile)
            for row in reader:
                if row[1] == username and row[2] == password:
                    print("Valid Username and Password")
                else:
                    print("Wrong Inputs")
The outcome is like:

Output:
Enter Username: mus34 Enter Passwrod: hello Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Wrong Inputs Walid Username and Passwrod
Reply


Messages In This Thread
Querying cvs excel files - by rturus - Mar-21-2019, 04:22 PM
RE: Querying cvs excel files - by ichabod801 - Mar-21-2019, 06:28 PM
RE: Querying cvs excel files - by rturus - Mar-26-2019, 10:37 AM
RE: Querying cvs excel files - by ichabod801 - Mar-26-2019, 03:24 PM
RE: Querying cvs excel files - by rturus - Mar-27-2019, 01:25 PM
RE: Querying cvs excel files - by perfringo - Mar-27-2019, 01:57 PM
RE: Querying cvs excel files - by ichabod801 - Mar-27-2019, 02:08 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Copy Paste excel files based on the first letters of the file name Viento 2 512 Feb-07-2024, 12:24 PM
Last Post: Viento
  How to loop through all excel files and sheets in folder jadelola 1 4,638 Dec-01-2022, 06:12 PM
Last Post: deanhystad
  Basic SQL query using Py: Inserting or querying sqlite3 database not returning data marlonbown 3 1,456 Nov-08-2022, 07:16 PM
Last Post: marlonbown
  Creating csv files from Excel file azizrasul 40 6,089 Nov-03-2022, 08:33 PM
Last Post: azizrasul
  Working with excel files arsouzaesilva 6 3,277 Sep-17-2021, 06:52 PM
Last Post: arsouzaesilva
  win32com — How to resolve “AttributeError: xlUp” for Excel files? JaneTan 2 4,339 Aug-18-2021, 05:27 AM
Last Post: snippsat
  code to read files in folders and transfer the file name, type, date created to excel Divya577 0 1,904 Dec-06-2020, 04:14 PM
Last Post: Divya577
  Creating Excel files compatible with microsoft access vkallavi 0 1,617 Sep-17-2020, 06:57 PM
Last Post: vkallavi
  Merging Excel Files JezMim 1 1,949 Sep-06-2020, 08:56 PM
Last Post: bowlofred
  Fastest Method for Querying SQL Server with Python Pandas BuJayBelvin 7 7,062 Aug-02-2020, 06:21 PM
Last Post: jefsummers

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020