Created
February 12, 2022 16:00
-
-
Save theDreamer911/a78ec2e6f3613d0b715e908295192526 to your computer and use it in GitHub Desktop.
This code is for built CSV with Python
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = input("Filename: ") | |
n = int(input("How many data: ")) | |
print("\a") | |
for i in range(n): | |
print("Data Number-" + str(i+1)) | |
first = str(input("First name: ")) | |
last = str(input("Last name: ")) | |
print("\a") | |
with open(f"{name}", "a") as f: | |
f.write(f'"{str(i+1)}","{first}","{last}"') | |
f.writelines('\n') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment