Deleting/sending to trash files with Python I made this program to automate/simplify the erasing of a lot of files, I have some ideas to improve it but that's not why I'm putting it here, it's because it's a very dangerous program(it deletes stuff permanently) and since I'm a beginner(ish) I want some advice from better programmers to improve it.

import os
import send2trash
import shutil
file = input("Type the file path")
while os.path.exists(file) is False:  # validation
    file = input("Path not found, try again:")
for i, j, k in os.walk(file):  # files check
    print("The folder is in this path:", i)
    print("The subfolders are named:", j)
    print("The files are named:", k)
while True:
    try:
        command = int(input("1 - Delete permanently the file\n2 - Send the file to the bin"))
    except ValueError:
        print("Just the numbers 1 or 2 are accepted, follow the instructions")
        continue
    if command not in range(1, 3):
        print("Just the numbers 1 or 2 are accepted, follow the instructions")
        continue
    else:
        break
if command == 1:
    try:
        os.rmdir(file)  # deletes if there is no inside folder
    except OSError:
        shutil.rmtree(file)  # deletes if there is inside folders
else:
    send2trash.send2trash(file)  # send to the bin
There are some things that can be improved here


Divide your code into functions, don't put everything in the global namespace!
Use a if __name__ == '__main__' guard.
It's not bad to give your code a little more space in the sake of readability, a few blank lines would help make this code look better. 

Read PEP8#blank-lines for more details.
Don't use == or is for False, True comparison

See PEP8#programming-recommendations.


while os.path.exists(file) is False:



You can rewrite to a more idomatic while not os.path.exists(file):
Naming is important


file = input("Type the file path")



This is a path, so rename it to path = ...


for i, j, k in os.walk(file):



You could name those to what they represent:

for folder, subfolder, files in os.walk(path):