Printing from csv to txt file

PHOTO EMBED

Tue Mar 28 2023 00:22:46 GMT+0000 (Coordinated Universal Time)

Saved by @lmacciomaretto

# string concatenation
    result = ""
    result += "Election Results\n"
    result += "------------------------\n"
    result += "------------------------------ \n"
    result += f"Total Votes: {total_vote} \n"    
    result += "------------------------------ \n"
     result += "------------------------------- \n"
    result += f"Winner : {winner_name} \n"
    result += "-------------------------------"
    print(result)
    # wiring text file
    with open("PyBank.txt", "w") as file:
        file.write(result)
content_copyCOPY