mirror of
https://github.com/JonasunderscoreJones/turbo-octo-potato.git
synced 2025-10-25 11:09:18 +02:00
added another one
This commit is contained in:
parent
389ed3d258
commit
2f2e677ce1
1 changed files with 14 additions and 0 deletions
14
keyvaluepairgenerator.py
Normal file
14
keyvaluepairgenerator.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
# Open the file in write mode ('w')
|
||||||
|
with open('uwu.txt', 'w') as file:
|
||||||
|
while True:
|
||||||
|
input1 = input('Enter input-1 (or leave it empty to exit): ')
|
||||||
|
input2 = input('Enter input-2 (or leave it empty to exit): ')
|
||||||
|
|
||||||
|
# Check if both inputs are empty, and exit the loop if they are
|
||||||
|
if not input1 and not input2:
|
||||||
|
break
|
||||||
|
|
||||||
|
# Write the input pair to the file in the specified format
|
||||||
|
file.write(f"'{input1}': '{input2}',\n")
|
||||||
|
|
||||||
|
print('Data saved to uwu.txt.')
|
||||||
Loading…
Add table
Add a link
Reference in a new issue