Writing strings to CSV causing issue where the string in CSV is separated by commas (Python)

i am facing an issue which i was not able to resolve so far. I need to save a list of strings into the CSV file. I am able to do it however the strings from each element of the list are separated by commas. Why is that and what i need to do to… Read More Writing strings to CSV causing issue where the string in CSV is separated by commas (Python)

Why isn't my function save_users(): working? How do I save these passwords to file?

from hashlib import sha256 import random, sys def hash(string): ”’Hashes a string”’ return sha256( string.encode()).hexdigest() # when using hash() returns a hashed string def save_users(): f = open("UserDetails.txt", "w") f.write("Username;{} \nPassword:{}".format(username, password)) f.close print("\nWelcome") signIn = input("Do you have an account? [Y/N]").upper() if signIn == "N": print("Sign up :") username = input("New Username: ") password… Read More Why isn't my function save_users(): working? How do I save these passwords to file?