import os print("---------------------------------") print('THIS APP HELPS YOU SAVE YOUR HOBBY') print("---------------------------------") hobbies = [] nonExistentHobbies = [] numerotation = ['first', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh', 'eight', 'nineth', 'tenth'] # Let's check if there is somthing inside your hobby list if os.path.isfile('./hobby.txt'): hobby_file = open('hobby.txt', 'r') hobbies = hobby_file.read().split(',') hobby_file.close() print(f'Here are your previous hobby list : {hobbies}') else: print('you did not save any previous hobby , that means it is probably' ' your first time to be here,ok fine then.. let me remind you on last thing' ' please DONT FUCK WITH ME, if you want you try , you will see') # Checking if the hoby already exist numHobbies = input('Before we start, how many hobby do you want to save? ') if numHobbies and int(numHobbies) >= 1: numHobbies = int(numHobbies) for i in range(0, int(numHobbies)): user_hobby = input(f'Please input your {numerotation[i]} hobby ') if user_hobby.lower() in hobbies: print('This hobby is set already') numHobbies = numHobbies + 1 else: if user_hobby != '': hobbies.append(user_hobby.lower()) else: print('You cannot enter a fucking empty hobby!') numHobbies = numHobbies + 1 print('Ok we registered your fucking hobby, you fucking dumb ass! ') print('-----------------------------------------------') print(f'Here is the list of all your hobbies {hobbies}') print('-----------------------------------------------') deleteHobby = input('Do you want to delete some hobbies? yes or no ') if deleteHobby.lower() == 'yes': print('Ok i just want to remind you that if you want to delete multiple hobbies' ' , you need to seperate them with a comma! ') hobbiesToBedeleted = input('now input your shits! ') hobbiesToBedeleted = hobbiesToBedeleted.split(',') for i in range(0, len(hobbiesToBedeleted)): if hobbiesToBedeleted[i].lower() in hobbies: hobbies.remove(hobbiesToBedeleted[i]) print(f'{hobbiesToBedeleted[i]} deleted successfully!') print('----------------------------------------------') else: nonExistentHobbies.append(hobbiesToBedeleted[i]) if len(nonExistentHobbies) == 1: print(f'{nonExistentHobbies[0]} is not even inside your hobby list, can you see how stupid you are?') else: lastItem = nonExistentHobbies[len(nonExistentHobbies) - 1] lastItem = 'and ' + lastItem nonExistentHobbies.remove(nonExistentHobbies[len(nonExistentHobbies) - 1]) nonExistentHobbies = ','.join(nonExistentHobbies) print(f'{nonExistentHobbies} {lastItem} are not even inside your hobby list, you fucking dumb ass!') print('----------------------------------------') if hobbies: print(f'After the deleting process, this is the rest of you hobby list {hobbies}') print('Now we are going to save them inside a text file , so that you will be able' 'to access it later on') hobby_file = open('hobby.txt', 'w') hobby_file.write(','.join(hobbies)) hobby_file.close() else: print('Ok looks like you deleted everything... ok Fine then, your hobby list are empty now!') else: print('Ok , see you next time sweety!') else: print('Fucking stupid guy!, let me see you here again!')