Question: Python - lists Does anyone have an idea on how I could edit my code in order to not allow duplicates in the example (bottom

Python - lists

Python - lists Does anyone have an idea on how I could

edit my code in order to not allow duplicates in the example

Does anyone have an idea on how I could edit my code in order to not allow duplicates in the example (bottom picture) and also order it from the greatest to smallest frequency?

This is a project for school, nothing nepharious

def input1(): pulls the usernames and passwords from testdata. txt global passwords, usernames usernames [ passwords[ file_open open('testdata.txt', 'r') for accounts in file_open: username, password accounts.split('\t') passwordpassword.strip('n') usernames.append (username) passwords.append (password) def output1): calculations and part.1 of list'"' g Lobal password_data_list password_data_list [l password_frequency_total 0 for password in passwords: password_frequency_total-password_f requency_total 1 print(':17H:13.format( 'Password', 'Frequency',) print('-' * 40) for password in passwords: password_frequency passwords.count (password) password-frequency-percentage = ((password-frequency / password-frequency total) * 100) password-data= }:>10().

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!